如何将 box2d 主体指向运动方向?
大家好,正如标题所示,我想将 box2d 主体移动到运动方向。任何人都可以提供一些线索,我如何实现这一目标?谢谢
,我现在使用的
b->SetLinearImpusle(force,direciton);
身体只是根据碰撞而旋转
Hi guys as the title suggest i want to move a box2d body the direction of motion .. can anyone give some clue how can i achieve this ? Thanks
right now i am using
b->SetLinearImpusle(force,direciton);
the body just rotates according to the collision
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只想在指定方向应用脉冲:
ApplyLinearImpulse 的第二个参数是应用脉冲的点
If you want just to apply an impulse in specified direction:
the second parameter of ApplyLinearImpulse is the point where to apply the impulse