reckfellENGINE

PhysicalBone2D

A RigidBody2D-derived node used to make Bone2Ds in a Skeleton2D react to physics.

On this page
class PhysicalBone2DReckfellSharpInherits RigidBody2D

A RigidBody2D-derived node used to make Bone2Ds in a Skeleton2D react to physics.

The PhysicalBone2D node is a RigidBody2D-based node that can be used to make Bone2Ds in a Skeleton2D react to physics. Note: To make the Bone2Ds visually follow the PhysicalBone2D node, use a SkeletonModification2DPhysicalBones modification on the Skeleton2D parent. Note: The PhysicalBone2D node does not automatically create a Joint2D node to keep PhysicalBone2D nodes together. They must be created manually. For most cases, you want to use a PinJoint2D node. The PhysicalBone2D node will automatically configure the Joint2D node once it's been added as a child node.

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

Constructors1

PhysicalBone2DConstructor
# PhysicalBone2D
C#
public PhysicalBone2D();

Properties5

AutoConfigureJointProperty
# AutoConfigureJoint
C#
public bool AutoConfigureJoint { get; set; }

If true, the PhysicalBone2D will automatically configure the first Joint2D child node. The automatic configuration is limited to setting up the node properties and positioning the Joint2D.

Bone2DEntitypathProperty
# Bone2DEntitypath
C#
public EntityPath Bone2DEntitypath { get; set; }

The EntityPath to the Bone2D that this PhysicalBone2D should simulate.

Bone2DIndexProperty
# Bone2DIndex
C#
public int Bone2DIndex { get; set; }

The index of the Bone2D that this PhysicalBone2D should simulate.

FollowBoneWhenSimulatingProperty
# FollowBoneWhenSimulating
C#
public bool FollowBoneWhenSimulating { get; set; }

If true, the PhysicalBone2D will keep the transform of the bone it is bound to when simulating physics.

SimulatePhysicsProperty
# SimulatePhysics
C#
public bool SimulatePhysics { get; set; }

If true, the PhysicalBone2D will start simulating using physics. If false, the PhysicalBone2D will follow the transform of the Bone2D node. Note: To have the Bone2Ds visually follow the PhysicalBone2D, use a SkeletonModification2DPhysicalBones modification on the Skeleton2D node with the Bone2D nodes.

Methods12

GetAutoConfigureJointbool
# GetAutoConfigureJoint
C#
public bool GetAutoConfigureJoint();
Returns bool
GetBone2DEntitypathEntityPath
# GetBone2DEntitypath
C#
public EntityPath GetBone2DEntitypath();
Returns EntityPath
GetBone2DIndexint
# GetBone2DIndex
C#
public int GetBone2DIndex();
Returns int
GetFollowBoneWhenSimulatingbool
# GetFollowBoneWhenSimulating
C#
public bool GetFollowBoneWhenSimulating();
Returns bool
GetJointJoint2D
# GetJoint
C#
public Joint2D GetJoint();

Returns the first Joint2D child node, if one exists. This is mainly a helper function to make it easier to get the Joint2D that the PhysicalBone2D is autoconfiguring.

Returns Joint2D
GetSimulatePhysicsbool
# GetSimulatePhysics
C#
public bool GetSimulatePhysics();
Returns bool
IsSimulatingPhysicsbool
# IsSimulatingPhysics
C#
public bool IsSimulatingPhysics();

Returns a boolean that indicates whether the PhysicalBone2D is running and simulating using the Reckfell 2D physics engine. When true, the PhysicalBone2D node is using physics.

Returns bool
SetAutoConfigureJointvoid
# SetAutoConfigureJoint
C#
public void SetAutoConfigureJoint(bool autoConfigureJoint);
Parameters
NameTypeDefault
autoConfigureJointbool—
SetBone2DEntitypathvoid
# SetBone2DEntitypath
C#
public void SetBone2DEntitypath(EntityPath entitypath);
Parameters
NameTypeDefault
entitypathEntityPath—
SetBone2DIndexvoid
# SetBone2DIndex
C#
public void SetBone2DIndex(int boneIndex);
Parameters
NameTypeDefault
boneIndexint—
SetFollowBoneWhenSimulatingvoid
# SetFollowBoneWhenSimulating
C#
public void SetFollowBoneWhenSimulating(bool followBone);
Parameters
NameTypeDefault
followBonebool—
SetSimulatePhysicsvoid
# SetSimulatePhysics
C#
public void SetSimulatePhysics(bool simulatePhysics);
Parameters
NameTypeDefault
simulatePhysicsbool—
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.