DistanceJoint2D
Joint that keeps two Rigidbody2D objects a fixed distance apart.
Read time 6 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: AnchoredJoint2D
public sealed class DistanceJoint2D : AnchoredJoint2D
Remarks
Note that unlike the SpringJoint2D component, the distance separating the objects is truly fixed and does not allow for any stretching.
Properties
Property | Description |
|---|---|
| autoConfigureDistance | Should the |
| distance | The distance separating the two ends of the joint. |
| maxDistanceOnly | Whether to maintain a maximum distance only or not. If not then the absolute distance will be maintained instead. |
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. |