Class PinJoint2D
A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate.
- Inheritance
-
PinJoint2D
Remarks
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
angular_limit_enabled
If true
, the pin maximum and minimum rotation, defined by angular_limit_lower and angular_limit_upper are applied.
var angular_limit_enabled : bool = false
Property Value
Remarks
angular_limit_lower
The minimum rotation. Only active if angular_limit_enabled is true
.
var angular_limit_lower : float = 0.0
Property Value
Remarks
angular_limit_upper
The maximum rotation. Only active if angular_limit_enabled is true
.
var angular_limit_upper : float = 0.0
Property Value
Remarks
motor_enabled
When activated, a motor turns the pin.
var motor_enabled : bool = false
Property Value
Remarks
motor_target_velocity
Target speed for the motor. In radians per second.
var motor_target_velocity : float = 0.0
Property Value
Remarks
softness
The higher this value, the more the bond to the pinned partner can flex.
var softness : float = 0.0