Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public sealed class SpringJoint2D : AnchoredJoint2D

Remarks

Note that unlike DistanceJoint2D, the length of the joint can stretch and oscillate.
Additional Resources: DistanceJoint2D, HingeJoint2D, SliderJoint2D.

Properties

Property

Description

autoConfigureDistanceShould the distance be calculated automatically?
dampingRatioThe amount by which the spring force is reduced in proportion to the movement speed.
distanceThe distance the spring will try to keep between the two objects.
frequencyThe frequency at which the spring oscillates around the distance distance between the objects.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.