Inheritance #

PinJoint2D
Table of contents

PinJoint2D #

is_instantiable, Node2D, Node, core, not_builtin_classes

A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate.

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.

Members #

var angular_limit_enabled: bool = false#

If true, the pin maximum and minimum rotation, defined by angular_limit_lower and angular_limit_upper are applied.

var angular_limit_lower: float = 0.0#

The minimum rotation. Only active if angular_limit_enabled is true.

var angular_limit_upper: float = 0.0#

The maximum rotation. Only active if angular_limit_enabled is true.

var motor_enabled: bool = false#

When activated, a motor turns the pin.

var motor_target_velocity: float = 0.0#

Target speed for the motor. In radians per second.

var softness: float = 0.0#

The higher this value, the more the bond to the pinned partner can flex.

Methods #

Annotations #

Constants #

Constructors #

Enums #

Operators #

Signals #

Theme Items #

Tutorials #