Problem with rotation axis

Hello I loaded a Model with OgreMesh and I create a HigeJoint with two parts of the model (part a is no mobile):



[java] hinge=new PhysicsHingeJoint(physAnt, actualPhysNode,

new Vector3f(0f, 0.0f, 0.0f) ,new Vector3f(0f,0.0f,0.0f),Vector3f.UNIT_Z, Vector3f.UNIT_Z);

physicsSpace.add(hinge);

hinge.enableMotor(true, 500f, 500f);

hinge.setCollisionBetweenLinkedBodys(true);

hinge.setAngularOnly(false);

[/java]



Note: The joint works with the pivot values to zero. But with other values the result is that the objects are separated from each other.



But I have a problem when actualPhysNode (object B) make the rotation. The rotation is traslated:













But the centers of the objecs are the correct:







What is the problem? Is it a problem of the center of mass or joint?

Solutions?



Thanks for your time.

The “pivot” is the local translation of the connection point in the physics node.