DistanceJoint2D
Joint that keeps two Rigidbody2D objects a fixed distance apart.
阅读时间7 分钟最后更新于 1 个月前
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. |