HingeJoint.limits Manual     Reference     Scripting  
Scripting > Runtime Classes > HingeJoint

var limits : JointLimits


The limits of the hinge joint.

The joint will be limited so that the angle is always between limits.min and limits.max. The joint angle is in degrees relative to the rest angle. The rest angle between the bodies is always zero at the beginning of the simulation.

// Make hinge limit for a door.
hingeJoint.limits.min = 0;
hingeJoint.limits.minBounce = 0;
hingeJoint.limits.max = 90;
hingeJoint.limits.maxBounce = 0;

Modifying the limit automatically enables it.