Limit of angular rotation on the hinge joint.
// Make hinge limit for a door. var limits = hingeJoint.limits; limits.min = 0; limits.minBounce = 0; limits.max = 90; limits.maxBounce = 0; hingeJoint.limits = limits;
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { public JointLimits limits = hingeJoint.limits; void Example() { limits.min = 0; limits.minBounce = 0; limits.max = 90; limits.maxBounce = 0; hingeJoint.limits = limits; } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): public limits as JointLimits = hingeJoint.limits def Example() as void: limits.min = 0 limits.minBounce = 0 limits.max = 90 limits.maxBounce = 0 hingeJoint.limits = limits