RevoluteJoint Stop Rotating when Some Physics Body Collide in Andengine + Box2d?
- by Nikhil Lamba
I am making a Game from andengine + box2d in Which i am using RevoluteJoint in that case i am facing some problem that when physics body or Sprite Collide with this Revolute joint body then Revolute body stop rotating then after some time it start rotating
I am using below code for this :
this.mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(movingFace, movingBody, true, true));
final RevoluteJointDef revoluteJointDef = new RevoluteJointDef();
revoluteJointDef.initialize(anchorBody, movingBody, anchorBody.getWorldCenter());
revoluteJointDef.enableMotor = true;
revoluteJointDef.motorSpeed = 100;
revoluteJointDef.maxMotorTorque = 200;
this.mPhysicsWorld.createJoint(revoluteJointDef);
EDIT Here is a screenshot: