Groove constraint for 2D physics.
    public class GrooveJoint2D : Joint2D

Groove constraint for 2D physics. This is useful for making a body “slide” through a segment placed in another.

Inheritance Chain


    public GrooveJoint2D()


    public float InitialOffset { get; set; }

The body B’s initial anchor position defined by the joint’s origin and a local offset InitialOffset along the joint’s y axis (along the groove). Default value: 25

    public float Length { get; set; }

The groove’s length. The groove is from the joint’s origin towards Length along the joint’s local y axis. Default value: 50


    public float GetInitialOffset()

Getter for InitialOffset

    public float GetLength()

Getter for Length

    public void SetInitialOffset(float offset)

Setter for InitialOffset

    public void SetLength(float length)

Setter for Length