float MinAngle { get; set; }

robot_2Generated
code_blocksInput

Description

The MinAngle property of the HingeJoint class specifies the minimum angle that the hinge joint is allowed to rotate to. This property is useful for constraining the movement of the joint to a specific range, preventing it from rotating beyond a certain point in the negative direction.

Usage

To use the MinAngle property, you can set it to a desired value in degrees. This value will define the lower limit of the hinge joint's rotation. Ensure that the MinAngle is less than or equal to the MaxAngle to maintain a valid range of motion.

Example

// Create a new HingeJoint instance
HingeJoint hingeJoint = new HingeJoint();

// Set the minimum angle to -45 degrees
hingeJoint.MinAngle = -45.0f;

// Set the maximum angle to 45 degrees
hingeJoint.MaxAngle = 45.0f;

// Now the hinge joint can rotate between -45 and 45 degrees