SkeletonModification2DPhysicalBones
A modification that applies the transforms of PhysicalBone2D nodes to Bone2D nodes.
A modification that applies the transforms of PhysicalBone2D nodes to Bone2D nodes.
This modification takes the transforms of PhysicalBone2D nodes and applies them to Bone2D nodes. This allows the Bone2D nodes to react to physics thanks to the linked PhysicalBone2D nodes.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
SkeletonModification2DPhysicalBonesConstructor
public SkeletonModification2DPhysicalBones();Properties1
PhysicalBoneChainLengthProperty
public int PhysicalBoneChainLength { get; set; }The number of PhysicalBone2D nodes linked in this modification.
Methods7
FetchPhysicalBonesvoid
public void FetchPhysicalBones();Empties the list of PhysicalBone2D nodes and populates it with all PhysicalBone2D nodes that are children of the Skeleton2D.
GetPhysicalBoneChainLengthint
public int GetPhysicalBoneChainLength();intGetPhysicalBoneEntityEntityPath
public EntityPath GetPhysicalBoneEntity(int jointIdx);Returns the PhysicalBone2D node at joint_idx.
| Name | Type | Default |
|---|---|---|
jointIdx | int | — |
EntityPathSetPhysicalBoneChainLengthvoid
public void SetPhysicalBoneChainLength(int length);| Name | Type | Default |
|---|---|---|
length | int | — |
SetPhysicalBoneEntityvoid
public void SetPhysicalBoneEntity(int jointIdx, EntityPath physicalbone2DNode);Sets the PhysicalBone2D node at joint_idx.
Note: This is just the index used for this modification, not the bone index used in the Skeleton2D.
| Name | Type | Default |
|---|---|---|
jointIdx | int | — |
physicalbone2DNode | EntityPath | — |
StartSimulationvoid
public void StartSimulation(Reckfell.Collections.Array<StringName> bones = null);Tell the PhysicalBone2D nodes to start simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only PhysicalBone2D nodes with those names to start simulating.
| Name | Type | Default |
|---|---|---|
bones | Reckfell.Collections.Array<StringName> | null |
StopSimulationvoid
public void StopSimulation(Reckfell.Collections.Array<StringName> bones = null);Tell the PhysicalBone2D nodes to stop simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only PhysicalBone2D nodes with those names to stop simulating.
| Name | Type | Default |
|---|---|---|
bones | Reckfell.Collections.Array<StringName> | null |