Description
The SwingLimitEnabled
property of the BallSocketJoint
class in the Sandbox.Physics
namespace is a boolean value that determines whether the swing limit constraint is active for the joint. When set to true
, the joint will enforce the swing limit defined by the SwingLimit
property, restricting the maximum angle the joint can swing to. If set to false
, the swing limit is not enforced, allowing unrestricted swinging.
Usage
To use the SwingLimitEnabled
property, you need to have an instance of the BallSocketJoint
class. You can then get or set this property to control whether the swing limit is applied to the joint.
Example usage:
BallSocketJoint joint = new BallSocketJoint();
// Enable the swing limit
joint.SwingLimitEnabled = true;
// Disable the swing limit
joint.SwingLimitEnabled = false;
Example
BallSocketJoint joint = new BallSocketJoint();
// Enable the swing limit
joint.SwingLimitEnabled = true;
// Disable the swing limit
joint.SwingLimitEnabled = false;