# 6dof joint limit wont work

Hello, im trying to use the 6dof joint to limit the rotation, but it wont work.

[java] Physics6DofJoint ship6DofJoint = new Physics6DofJoint(pNode, ship, new Vector3f(0, 0.0f, 0) , Vector3f.ZERO , true);

ship6DofJoint.setLinearUpperLimit(new Vector3f(100, 0f, 100) );

ship6DofJoint.setLinearLowerLimit(new Vector3f(-100, 0f, -100) );

ship6DofJoint.setAngularLowerLimit(Vector3f.ZERO);

ship6DofJoint.setAngularUpperLimit(Vector3f.ZERO);[/java]

It goes well with using a PhysicsHingeJoint but this will also restrict the translation.

The 6dof joint has multiple axes, get the motors of the single axes to modify them.

I have tried this already:

[java] ship6DofJoint.getRotationalLimitMotor(1).setEnableMotor(true);

ship6DofJoint.getRotationalLimitMotor(2).setEnableMotor(true);

ship6DofJoint.getRotationalLimitMotor(0).setEnableMotor(true);

ship6DofJoint.getRotationalLimitMotor(0).setHiLimit(0);

ship6DofJoint.getRotationalLimitMotor(1).setHiLimit(0);

ship6DofJoint.getRotationalLimitMotor(2).setHiLimit(0);

ship6DofJoint.getRotationalLimitMotor(0).setLoLimit(0);

ship6DofJoint.getRotationalLimitMotor(1).setLoLimit(0);

ship6DofJoint.getRotationalLimitMotor(2).setLoLimit(0);[/java]

It doesnt work, maybe because im using the physics to rotate the object?

Uh, rotating the object has nothing to do with joints but ofc it might look as if the joint is moving.