I have a character with a "head" and a "tail". I attach them together with a pivot joint, but I only want the tail to rotate a maximum of 5 degrees in either direction:
1 2 3 | myJoint = physics.newJoint( "pivot", head, tail, head.x, head.y ) myJoint.isLimitEnabled = true myJoint:setRotationLimits( -5, 5 ) |