SpringJoint2D
Joint that attempts to keep two Rigidbody2D objects a set distance apart by applying a force between them.
Read time 7 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: AnchoredJoint2D
public sealed class SpringJoint2D : AnchoredJoint2D
Remarks
Note that unlike DistanceJoint2D, the length of the joint can stretch and oscillate.
Properties
Property | Description |
|---|---|
| autoConfigureDistance | Should the |
| dampingRatio | The amount by which the spring force is reduced in proportion to the movement speed. |
| distance | The distance the spring will try to keep between the two objects. |
| frequency | The frequency at which the spring oscillates around the distance distance between the objects. |
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. |