Table of Contents

Class PinJoint2D

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class PinJoint2D : Joint2D, IDisposable
Inheritance
PinJoint2D
Implements
Inherited Members

Constructors

PinJoint2D()

public PinJoint2D()

Properties

AngularLimitEnabled

If true, the pin maximum and minimum rotation, defined by AngularLimitLower and AngularLimitUpper are applied.

public bool AngularLimitEnabled { get; set; }

Property Value

bool

AngularLimitLower

The minimum rotation. Only active if AngularLimitEnabled is true.

public float AngularLimitLower { get; set; }

Property Value

float

AngularLimitUpper

The maximum rotation. Only active if AngularLimitEnabled is true.

public float AngularLimitUpper { get; set; }

Property Value

float

MotorEnabled

When activated, a motor turns the pin.

public bool MotorEnabled { get; set; }

Property Value

bool

MotorTargetVelocity

Target speed for the motor. In radians per second.

public float MotorTargetVelocity { get; set; }

Property Value

float

Softness

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

public float Softness { get; set; }

Property Value

float

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool