[英]Why even use kinematic bodies? box2d
Why should you even use kinematic bodies instead of dynamic bodies with no gravity? 为什么还要使用运动物体代替没有重力的动态物体? I mean a dynamic body can also collide with static bodies and have some other adjustable parameters that kinematic bodies do not have, right.
我的意思是,动态物体还可以与静态物体碰撞,并且具有运动物体没有的其他一些可调参数,对。 Therefore, I would really love to hear why you would want to do this and if it even can be lead to some advantages.
因此,我真的很想听听您为什么要这样做,甚至可以带来一些好处。
Your time is much appreciated! 感谢您的宝贵时间!
It's a matter of what you want b2World::Step
to do to the body. 这
b2World::Step
您想要b2World::Step
对身体做的事情。 Basically this method's body related post-conditions are as follows: 基本上,此方法与身体相关的后置条件如下:
So kinematic bodies can be useful when the only thing that you want to have happen to the body is to have it moved based on a velocity you'd given it. 因此,当您要发生在身体上的唯一事情是根据给定的速度移动身体时,运动身体可能会很有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.