I have created below hexagon structure in Andengine
with Box2D
physics engine. I want to rotate whole structure with respect to center when other ball collides with the structure using physics.
find reference image here : reference question
I tried weld joint
and revolute joint
with the bodies but it is not performing proper motion as required. All bodies are attached with weld joint
and vertices have revolute joint
with center body which is static like,
RevoluteJointDef revoluteJointDef1 = new RevoluteJointDef();
revoluteJointDef1.initialize(centerB, movingBody[i], centerB.getWorldCenter());
revoluteJointDef1.enableMotor = true;
revoluteJointDef1.motorSpeed = 0;
revoluteJointDef1.maxMotorTorque = 1f;
this.mPhysicsWorld.createJoint(revoluteJointDef1);
Is there any other way to perform smooth rotation of whole structure? Thanks.