reckfellENGINE

Joint2D

Abstract base class for all 2D physics joints.

On this page
class Joint2DReckfellSharpInherits Entity2D

Abstract base class for all 2D physics joints.

Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies (node_a and node_b) and apply a constraint.

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

Properties4

BiasProperty
# Bias
C#
public float Bias { get; set; }

When node_a and node_b move in different directions the Joint2D.Bias controls how fast the joint pulls them back to their original position. The lower the Joint2D.Bias the more the two bodies can pull on the joint. When set to 0, the default value from ProjectSettings.physics/2d/solver/default_constraint_bias is used.

DisableCollisionProperty
# DisableCollision
C#
public bool DisableCollision { get; set; }

If true, the two bodies bound together do not collide with each other.

EntityAProperty
# EntityA
C#
public EntityPath EntityA { get; set; }

Path to the first body (A) attached to the joint. The node must inherit PhysicsBody2D.

EntityBProperty
# EntityB
C#
public EntityPath EntityB { get; set; }

Path to the second body (B) attached to the joint. The node must inherit PhysicsBody2D.

Methods9

GetBiasfloat
# GetBias
C#
public float GetBias();
Returns float
GetEntityAEntityPath
# GetEntityA
C#
public EntityPath GetEntityA();
Returns EntityPath
GetEntityBEntityPath
# GetEntityB
C#
public EntityPath GetEntityB();
Returns EntityPath
GetExcludeEntitiesFromCollisionbool
# GetExcludeEntitiesFromCollision
C#
public bool GetExcludeEntitiesFromCollision();
Returns bool
GetRidRid
# GetRid
C#
public Rid GetRid();

Returns the joint's internal Rid from the PhysicsServer2D.

Returns Rid
SetBiasvoid
# SetBias
C#
public void SetBias(float bias);
Parameters
NameTypeDefault
biasfloat—
SetEntityAvoid
# SetEntityA
C#
public void SetEntityA(EntityPath node);
Parameters
NameTypeDefault
nodeEntityPath—
SetEntityBvoid
# SetEntityB
C#
public void SetEntityB(EntityPath node);
Parameters
NameTypeDefault
nodeEntityPath—
SetExcludeEntitiesFromCollisionvoid
# SetExcludeEntitiesFromCollision
C#
public void SetExcludeEntitiesFromCollision(bool enable);
Parameters
NameTypeDefault
enablebool—
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.