reckfellENGINE

PinJoint2D

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

On this page
class PinJoint2DReckfellSharpInherits Joint2D

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.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

PinJoint2DConstructor
# PinJoint2D
C#
public PinJoint2D();

Properties6

AngularLimitEnabledProperty
# AngularLimitEnabled
C#
public bool AngularLimitEnabled { get; set; }

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

AngularLimitLowerProperty
# AngularLimitLower
C#
public float AngularLimitLower { get; set; }

The minimum rotation. Only active if PinJoint2D.AngularLimitEnabled is true.

AngularLimitUpperProperty
# AngularLimitUpper
C#
public float AngularLimitUpper { get; set; }

The maximum rotation. Only active if PinJoint2D.AngularLimitEnabled is true.

MotorEnabledProperty
# MotorEnabled
C#
public bool MotorEnabled { get; set; }

When activated, a motor turns the pin.

MotorTargetVelocityProperty
# MotorTargetVelocity
C#
public float MotorTargetVelocity { get; set; }

Target speed for the motor. In radians per second.

SoftnessProperty
# Softness
C#
public float Softness { get; set; }

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

Methods12

GetAngularLimitLowerfloat
# GetAngularLimitLower
C#
public float GetAngularLimitLower();
Returns float
GetAngularLimitUpperfloat
# GetAngularLimitUpper
C#
public float GetAngularLimitUpper();
Returns float
GetMotorTargetVelocityfloat
# GetMotorTargetVelocity
C#
public float GetMotorTargetVelocity();
Returns float
GetSoftnessfloat
# GetSoftness
C#
public float GetSoftness();
Returns float
IsAngularLimitEnabledbool
# IsAngularLimitEnabled
C#
public bool IsAngularLimitEnabled();
Returns bool
IsMotorEnabledbool
# IsMotorEnabled
C#
public bool IsMotorEnabled();
Returns bool
SetAngularLimitEnabledvoid
# SetAngularLimitEnabled
C#
public void SetAngularLimitEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetAngularLimitLowervoid
# SetAngularLimitLower
C#
public void SetAngularLimitLower(float angularLimitLower);
Parameters
NameTypeDefault
angularLimitLowerfloat—
SetAngularLimitUppervoid
# SetAngularLimitUpper
C#
public void SetAngularLimitUpper(float angularLimitUpper);
Parameters
NameTypeDefault
angularLimitUpperfloat—
SetMotorEnabledvoid
# SetMotorEnabled
C#
public void SetMotorEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetMotorTargetVelocityvoid
# SetMotorTargetVelocity
C#
public void SetMotorTargetVelocity(float motorTargetVelocity);
Parameters
NameTypeDefault
motorTargetVelocityfloat—
SetSoftnessvoid
# SetSoftness
C#
public void SetSoftness(float softness);
Parameters
NameTypeDefault
softnessfloat—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.