SliderJoint2D
Joint that restricts the motion of a Rigidbody2D object to a single line.
Read time 7 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: AnchoredJoint2D
public sealed class SliderJoint2D : AnchoredJoint2D
Remarks
Additional Resources: Rigidbody2D, DistanceJoint2D, HingeJoint2D, SpringJoint2D, JointTranslationLimits2D.
Properties
Property | Description |
|---|---|
| angle | The angle of the line in space (in degrees). |
| autoConfigureAngle | Should the angle be calculated automatically? |
| jointSpeed | The current joint speed. |
| jointTranslation | The current joint translation. |
| limits | Restrictions on how far the joint can slide in each direction along the line. |
| limitState | Gets the state of the joint limit. |
| motor | Parameters for a motor force that is applied automatically to the Rigibody2D along the line. |
| referenceAngle | The angle (in degrees) referenced between the two bodies used as the constraint for the joint. |
| useLimits | Should motion limits be used? |
| useMotor | Should a motor force be applied automatically to the Rigidbody2D? |
Methods
Method | Description |
|---|---|
| GetMotorForce | Gets the motor force of the joint given the specified timestep. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |