Rotate b2Bodies in Box2d without messing up physics simulation
I have made a biped using box2d. The soldier has a gun, which is a b2Body and is attached to the soldier's arm using a b2Joint. I want to rotate the gun to point in the direction the soldier shoots without messing up the physics simulation. This eliminates SetTransform. I already have the angle. All I need to do is set the rotation. Is t开发者_开发知识库here any way to accomplish this without using motors and rotating the soldier's body parts?
精彩评论