Class reference

GrooveJoint2D

Inherits Joint2D

A physics joint that restricts the movement of two 2D physics bodies to a fixed axis.

Description

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.

Properties

float initial_offset = 25.0

The body B's initial anchor position defined by the joint's origin and a local offset initial_offset along the joint's Y axis (along the groove).

float length = 50.0

The groove's length. The groove is from the joint's origin towards length along the joint's local Y axis.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.