GrooveJoint2D

Hereda: Joint2D < Node2D < CanvasItem < Node < Object

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

Descripción

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.

Propiedades

float

initial_offset

25.0

float

length

50.0


Descripciones de Propiedades

float initial_offset = 25.0 🔗

  • void set_initial_offset(value: float)

  • float get_initial_offset()

La posición de anclaje inicial del cuerpo B definida por el origen de la junta y un desplazamiento local initial_offset a lo largo del eje Y de la junta (a lo largo de la ranura).


float length = 50.0 🔗

  • void set_length(value: float)

  • float get_length()

La longitud del surco. La ranura va desde el origen de la unión hacia length a lo largo del eje Y local de la unión.