Outdated documentation
This documentation page refers to Godot
4.3,
and may be outdated or incorrect.
Additionally, this engine version is
no longer supported.
Check this page in the stable branch for the latest additions and corrections.
GrooveJoint2D
Inherits: Joint2D < Node2D < CanvasItem < Node < Object
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
|
||
|
Property Descriptions
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).
The groove's length. The groove is from the joint's origin towards length along the joint's local Y axis.