GrooveJoint2D
A physics joint that restricts the movement of two 2D physics bodies to a fixed axis.
A physics joint that restricts the movement of two 2D physics bodies to a fixed axis.
A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. For example, a StaticBody2D representing a piston base can be attached to a RigidBody2D representing the piston head, moving up and down.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
GrooveJoint2DConstructor
public GrooveJoint2D();Properties2
InitialOffsetProperty
public float InitialOffset { get; set; }The body B's initial anchor position defined by the joint's origin and a local offset GrooveJoint2D.InitialOffset along the joint's Y axis (along the groove).
LengthProperty
public float Length { get; set; }The groove's length. The groove is from the joint's origin towards GrooveJoint2D.Length along the joint's local Y axis.
Methods4
GetInitialOffsetfloat
public float GetInitialOffset();floatGetLengthfloat
public float GetLength();floatSetInitialOffsetvoid
public void SetInitialOffset(float offset);| Name | Type | Default |
|---|---|---|
offset | float | — |
SetLengthvoid
public void SetLength(float length);| Name | Type | Default |
|---|---|---|
length | float | — |