W3cubDocs

/Godot 3.2

GrooveJoint2D

Inherits: Joint2D < Node2D < CanvasItem < Node < Object

Groove constraint for 2D physics.

Description

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

Properties

float initial_offset 25.0
float length 50.0

Property Descriptions

float initial_offset

Default 25.0
Setter set_initial_offset(value)
Getter get_initial_offset()

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

Default 50.0
Setter set_length(value)
Getter get_length()

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

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_groovejoint2d.html