Up to date
This page is up to date for Godot 4.3
.
If you still find outdated information, please open an issue.
PinJoint2DΒΆ
Inherits: Joint2D < Node2D < CanvasItem < Node < Object
A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate.
DescriptionΒΆ
A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. For example, a RigidBody2D can be attached to a StaticBody2D to create a pendulum or a seesaw.
PropertiesΒΆ
|
||
|
||
|
||
|
||
|
||
|
Property DescriptionsΒΆ
bool angular_limit_enabled = false
π
If true
, the pin maximum and minimum rotation, defined by angular_limit_lower and angular_limit_upper are applied.
float angular_limit_lower = 0.0
π
The minimum rotation. Only active if angular_limit_enabled is true
.
float angular_limit_upper = 0.0
π
The maximum rotation. Only active if angular_limit_enabled is true
.
bool motor_enabled = false
π
When activated, a motor turns the pin.
float motor_target_velocity = 0.0
π
Target speed for the motor. In radians per second.
The higher this value, the more the bond to the pinned partner can flex.