Class reference

PinJoint2D

Inherits Joint2D

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

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.

float softness = 0.0

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

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.