reckfellENGINE

SpringBoneSimulator3D

A SkeletonModifier3D to apply inertial wavering to bone chains.

On this page
class SpringBoneSimulator3DReckfellSharpInherits SkeletonModifier3D

A SkeletonModifier3D to apply inertial wavering to bone chains.

This SkeletonModifier3D can be used to wiggle hair, cloth, and tails. This modifier behaves differently from PhysicalBoneSimulator3D as it attempts to return the original pose after modification. If you setup SpringBoneSimulator3D.SetRootBone and SpringBoneSimulator3D.SetEndBone, it is treated as one bone chain. Note that it does not support a branched chain like Y-shaped chains. When a bone chain is created, an array is generated from the bones that exist in between and listed in the joint list. Several properties can be applied to each joint, such as SpringBoneSimulator3D.SetJointStiffness, SpringBoneSimulator3D.SetJointDrag, and SpringBoneSimulator3D.SetJointGravity. For simplicity, you can set values to all joints at the same time by using a Curve. If you want to specify detailed values individually, set SpringBoneSimulator3D.SetIndividualConfig to true. For physical simulation, SpringBoneSimulator3D can have children as self-standing collisions that are not related to PhysicsServer3D, see also SpringBoneCollision3D. Warning: A scaled SpringBoneSimulator3D will likely not behave as expected. Make sure that the parent Skeleton3D and its bones are not scaled. Note: Most methods in this class take an index parameter. This parameter specifies which setting list entry to return if the IK has multiple entries (e.g. settings/<index>/root_bone_name).

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

Constructors1

SpringBoneSimulator3DConstructor
# SpringBoneSimulator3D
C#
public SpringBoneSimulator3D();

Properties3

ExternalForceProperty
# ExternalForce
C#
public Vector3 ExternalForce { get; set; }

The constant force that always affected bones. It is equal to the result when the parent Skeleton3D moves at this speed in the opposite direction. This is useful for effects such as wind and anti-gravity.

MutableBoneAxesProperty
# MutableBoneAxes
C#
public bool MutableBoneAxes { get; set; }

If true, the solver retrieves the bone axis from the bone pose every frame. If false, the solver retrieves the bone axis from the bone rest and caches it, which increases performance slightly, but position changes in the bone pose made before processing this SpringBoneSimulator3D are ignored.

SettingCountProperty
# SettingCount
C#
public int SettingCount { get; set; }

The number of settings.

Methods86

AreAllChildCollisionsEnabledbool
# AreAllChildCollisionsEnabled
C#
public bool AreAllChildCollisionsEnabled(int index);

Returns true if all child SpringBoneCollision3Ds are contained in the collision list at index in the settings.

Parameters
NameTypeDefault
indexint—
Returns bool
AreBoneAxesMutablebool
# AreBoneAxesMutable
C#
public bool AreBoneAxesMutable();
Returns bool
ClearCollisionsvoid
# ClearCollisions
C#
public void ClearCollisions(int index);

Clears all collisions from the collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.

Parameters
NameTypeDefault
indexint—
ClearExcludeCollisionsvoid
# ClearExcludeCollisions
C#
public void ClearExcludeCollisions(int index);

Clears all exclude collisions from the collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.

Parameters
NameTypeDefault
indexint—
ClearSettingsvoid
# ClearSettings
C#
public void ClearSettings();

Clears all settings.

GetCenterBoneint
# GetCenterBone
C#
public int GetCenterBone(int index);

Returns the center bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns int
GetCenterBoneNamestring
# GetCenterBoneName
C#
public string GetCenterBoneName(int index);

Returns the center bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns string
GetCenterEntityEntityPath
# GetCenterEntity
C#
public EntityPath GetCenterEntity(int index);

Returns the center node path of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns EntityPath
GetCenterFromSpringBoneSimulator3D.CenterFrom
# GetCenterFrom
C#
public SpringBoneSimulator3D.CenterFrom GetCenterFrom(int index);

Returns what the center originates from in the bone chain.

Parameters
NameTypeDefault
indexint—
Returns SpringBoneSimulator3D.CenterFrom
GetCollisionCountint
# GetCollisionCount
C#
public int GetCollisionCount(int index);

Returns the collision count of the bone chain's collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.

Parameters
NameTypeDefault
indexint—
Returns int
GetCollisionPathEntityPath
# GetCollisionPath
C#
public EntityPath GetCollisionPath(int index, int collision);

Returns the node path of the SpringBoneCollision3D at collision in the bone chain's collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.

Parameters
NameTypeDefault
indexint—
collisionint—
Returns EntityPath
GetDragfloat
# GetDrag
C#
public float GetDrag(int index);

Returns the drag force damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns float
GetDragDampingCurveCurve
# GetDragDampingCurve
C#
public Curve GetDragDampingCurve(int index);

Returns the drag force damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns Curve
GetEndBoneint
# GetEndBone
C#
public int GetEndBone(int index);

Returns the end bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns int
GetEndBoneDirectionSkeletonModifier3D.BoneDirection
# GetEndBoneDirection
C#
public SkeletonModifier3D.BoneDirection GetEndBoneDirection(int index);

Returns the tail direction of the end bone of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
Returns SkeletonModifier3D.BoneDirection
GetEndBoneLengthfloat
# GetEndBoneLength
C#
public float GetEndBoneLength(int index);

Returns the end bone tail length of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
Returns float
GetEndBoneNamestring
# GetEndBoneName
C#
public string GetEndBoneName(int index);

Returns the end bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns string
GetExcludeCollisionCountint
# GetExcludeCollisionCount
C#
public int GetExcludeCollisionCount(int index);

Returns the exclude collision count of the bone chain's exclude collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.

Parameters
NameTypeDefault
indexint—
Returns int
GetExcludeCollisionPathEntityPath
# GetExcludeCollisionPath
C#
public EntityPath GetExcludeCollisionPath(int index, int collision);

Returns the node path of the SpringBoneCollision3D at collision in the bone chain's exclude collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.

Parameters
NameTypeDefault
indexint—
collisionint—
Returns EntityPath
GetExternalForceVector3
# GetExternalForce
C#
public Vector3 GetExternalForce();
Returns Vector3
GetGravityfloat
# GetGravity
C#
public float GetGravity(int index);

Returns the gravity amount of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns float
GetGravityDampingCurveCurve
# GetGravityDampingCurve
C#
public Curve GetGravityDampingCurve(int index);

Returns the gravity amount damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns Curve
GetGravityDirectionVector3
# GetGravityDirection
C#
public Vector3 GetGravityDirection(int index);

Returns the gravity direction of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns Vector3
GetJointBoneint
# GetJointBone
C#
public int GetJointBone(int index, int joint);

Returns the bone index at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns int
GetJointBoneNamestring
# GetJointBoneName
C#
public string GetJointBoneName(int index, int joint);

Returns the bone name at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns string
GetJointCountint
# GetJointCount
C#
public int GetJointCount(int index);

Returns the joint count of the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
Returns int
GetJointDragfloat
# GetJointDrag
C#
public float GetJointDrag(int index, int joint);

Returns the drag force at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns float
GetJointGravityfloat
# GetJointGravity
C#
public float GetJointGravity(int index, int joint);

Returns the gravity amount at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns float
GetJointGravityDirectionVector3
# GetJointGravityDirection
C#
public Vector3 GetJointGravityDirection(int index, int joint);

Returns the gravity direction at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns Vector3
GetJointRadiusfloat
# GetJointRadius
C#
public float GetJointRadius(int index, int joint);

Returns the radius at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns float
GetJointRotationAxisSkeletonModifier3D.RotationAxis
# GetJointRotationAxis
C#
public SkeletonModifier3D.RotationAxis GetJointRotationAxis(int index, int joint);

Returns the rotation axis at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns SkeletonModifier3D.RotationAxis
GetJointRotationAxisVectorVector3
# GetJointRotationAxisVector
C#
public Vector3 GetJointRotationAxisVector(int index, int joint);

Returns the rotation axis vector for the specified joint in the bone chain. This vector represents the axis around which the joint can rotate. It is determined based on the rotation axis set for the joint. If SpringBoneSimulator3D.GetJointRotationAxis is SkeletonModifier3D.RotationAxis.All, this method returns Vector3(0, 0, 0).

Parameters
NameTypeDefault
indexint—
jointint—
Returns Vector3
GetJointStiffnessfloat
# GetJointStiffness
C#
public float GetJointStiffness(int index, int joint);

Returns the stiffness force at joint in the bone chain's joint list.

Parameters
NameTypeDefault
indexint—
jointint—
Returns float
GetRadiusfloat
# GetRadius
C#
public float GetRadius(int index);

Returns the joint radius of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns float
GetRadiusDampingCurveCurve
# GetRadiusDampingCurve
C#
public Curve GetRadiusDampingCurve(int index);

Returns the joint radius damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns Curve
GetRootBoneint
# GetRootBone
C#
public int GetRootBone(int index);

Returns the root bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns int
GetRootBoneNamestring
# GetRootBoneName
C#
public string GetRootBoneName(int index);

Returns the root bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns string
GetRotationAxisSkeletonModifier3D.RotationAxis
# GetRotationAxis
C#
public SkeletonModifier3D.RotationAxis GetRotationAxis(int index);

Returns the rotation axis of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns SkeletonModifier3D.RotationAxis
GetRotationAxisVectorVector3
# GetRotationAxisVector
C#
public Vector3 GetRotationAxisVector(int index);

Returns the rotation axis vector of the bone chain. This vector represents the axis around which the bone chain can rotate. It is determined based on the rotation axis set for the bone chain. If SpringBoneSimulator3D.GetRotationAxis is SkeletonModifier3D.RotationAxis.All, this method returns Vector3(0, 0, 0).

Parameters
NameTypeDefault
indexint—
Returns Vector3
GetSettingCountint
# GetSettingCount
C#
public int GetSettingCount();
Returns int
GetStiffnessfloat
# GetStiffness
C#
public float GetStiffness(int index);

Returns the stiffness force of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns float
GetStiffnessDampingCurveCurve
# GetStiffnessDampingCurve
C#
public Curve GetStiffnessDampingCurve(int index);

Returns the stiffness force damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
Returns Curve
IsConfigIndividualbool
# IsConfigIndividual
C#
public bool IsConfigIndividual(int index);

Returns true if the config can be edited individually for each joint.

Parameters
NameTypeDefault
indexint—
Returns bool
IsEndBoneExtendedbool
# IsEndBoneExtended
C#
public bool IsEndBoneExtended(int index);

Returns true if the end bone is extended to have a tail.

Parameters
NameTypeDefault
indexint—
Returns bool
Resetvoid
# Reset
C#
public void Reset();

Resets a simulating state with respect to the current bone pose. It is useful to prevent the simulation result getting violent. For example, calling this immediately after a call to AnimationPlayer.Play without a fading, or within the previous SkeletonModifier3D.ModificationProcessed signal if its condition changes significantly.

SetCenterBonevoid
# SetCenterBone
C#
public void SetCenterBone(int index, int bone);

Sets the center bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
boneint—
SetCenterBoneNamevoid
# SetCenterBoneName
C#
public void SetCenterBoneName(int index, string boneName);

Sets the center bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetCenterEntityvoid
# SetCenterEntity
C#
public void SetCenterEntity(int index, EntityPath entityPath);

Sets the center node path of the bone chain.

Parameters
NameTypeDefault
indexint—
entityPathEntityPath—
SetCenterFromvoid
# SetCenterFrom
C#
public void SetCenterFrom(int index, SpringBoneSimulator3D.CenterFrom centerFrom);

Sets what the center originates from in the bone chain. Bone movement is calculated based on the difference in relative distance between center and bone in the previous and next frames. For example, if the parent Skeleton3D is used as the center, the bones are considered to have not moved if the Skeleton3D moves in the world. In this case, only a change in the bone pose is considered to be a bone movement.

Parameters
NameTypeDefault
indexint—
centerFromSpringBoneSimulator3D.CenterFrom—
SetCollisionCountvoid
# SetCollisionCount
C#
public void SetCollisionCount(int index, int count);

Sets the number of collisions in the collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.

Parameters
NameTypeDefault
indexint—
countint—
SetCollisionPathvoid
# SetCollisionPath
C#
public void SetCollisionPath(int index, int collision, EntityPath entityPath);

Sets the node path of the SpringBoneCollision3D at collision in the bone chain's collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.

Parameters
NameTypeDefault
indexint—
collisionint—
entityPathEntityPath—
SetDragvoid
# SetDrag
C#
public void SetDrag(int index, float drag);

Sets the drag force of the bone chain. The greater the value, the more suppressed the wiggling. The value is scaled by SpringBoneSimulator3D.SetDragDampingCurve and cached in each joint setting in the joint list.

Parameters
NameTypeDefault
indexint—
dragfloat—
SetDragDampingCurvevoid
# SetDragDampingCurve
C#
public void SetDragDampingCurve(int index, Curve curve);

Sets the drag force damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
curveCurve—
SetEnableAllChildCollisionsvoid
# SetEnableAllChildCollisions
C#
public void SetEnableAllChildCollisions(int index, bool enabled);

If enabled is true, all child SpringBoneCollision3Ds are colliding and SpringBoneSimulator3D.SetExcludeCollisionPath is enabled as an exclusion list at index in the settings. If enabled is false, you need to manually register all valid collisions with SpringBoneSimulator3D.SetCollisionPath.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetEndBonevoid
# SetEndBone
C#
public void SetEndBone(int index, int bone);

Sets the end bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
boneint—
SetEndBoneDirection2 overloads
# SetEndBoneDirection · 1/2
C#
public void SetEndBoneDirection(int index, SkeletonModifier3D.BoneDirection boneDirection);

Sets the end bone tail direction of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
boneDirectionSkeletonModifier3D.BoneDirection—
# SetEndBoneDirection · 2/2
C#
public void SetEndBoneDirection(int index, int boneDirection);

Sets the end bone tail direction of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
boneDirectionint—
SetEndBoneLengthvoid
# SetEndBoneLength
C#
public void SetEndBoneLength(int index, float length);

Sets the end bone tail length of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.

Parameters
NameTypeDefault
indexint—
lengthfloat—
SetEndBoneNamevoid
# SetEndBoneName
C#
public void SetEndBoneName(int index, string boneName);

Sets the end bone name of the bone chain. Note: End bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by SpringBoneSimulator3D.SetExtendEndBone to jiggle the bone.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetExcludeCollisionCountvoid
# SetExcludeCollisionCount
C#
public void SetExcludeCollisionCount(int index, int count);

Sets the number of exclude collisions in the exclude collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.

Parameters
NameTypeDefault
indexint—
countint—
SetExcludeCollisionPathvoid
# SetExcludeCollisionPath
C#
public void SetExcludeCollisionPath(int index, int collision, EntityPath entityPath);

Sets the node path of the SpringBoneCollision3D at collision in the bone chain's exclude collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.

Parameters
NameTypeDefault
indexint—
collisionint—
entityPathEntityPath—
SetExtendEndBonevoid
# SetExtendEndBone
C#
public void SetExtendEndBone(int index, bool enabled);

If enabled is true, the end bone is extended to have a tail. The extended tail config is allocated to the last element in the joint list. In other words, if you set enabled to false, the config of the last element in the joint list has no effect in the simulated result.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetExternalForcevoid
# SetExternalForce
C#
public void SetExternalForce(Vector3 force);
Parameters
NameTypeDefault
forceVector3—
SetGravityvoid
# SetGravity
C#
public void SetGravity(int index, float gravity);

Sets the gravity amount of the bone chain. This value is not an acceleration, but a constant velocity of movement in SpringBoneSimulator3D.SetGravityDirection. If gravity is not 0, the modified pose will not return to the original pose since it is always affected by gravity. The value is scaled by SpringBoneSimulator3D.SetGravityDampingCurve and cached in each joint setting in the joint list.

Parameters
NameTypeDefault
indexint—
gravityfloat—
SetGravityDampingCurvevoid
# SetGravityDampingCurve
C#
public void SetGravityDampingCurve(int index, Curve curve);

Sets the gravity amount damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
curveCurve—
SetGravityDirectionvoid
# SetGravityDirection
C#
public void SetGravityDirection(int index, Vector3 gravityDirection);

Sets the gravity direction of the bone chain. This value is internally normalized and then multiplied by SpringBoneSimulator3D.SetGravity. The value is cached in each joint setting in the joint list.

Parameters
NameTypeDefault
indexint—
gravityDirectionVector3—
SetIndividualConfigvoid
# SetIndividualConfig
C#
public void SetIndividualConfig(int index, bool enabled);

If enabled is true, the config can be edited individually for each joint.

Parameters
NameTypeDefault
indexint—
enabledbool—
SetJointDragvoid
# SetJointDrag
C#
public void SetJointDrag(int index, int joint, float drag);

Sets the drag force at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true.

Parameters
NameTypeDefault
indexint—
jointint—
dragfloat—
SetJointGravityvoid
# SetJointGravity
C#
public void SetJointGravity(int index, int joint, float gravity);

Sets the gravity amount at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true.

Parameters
NameTypeDefault
indexint—
jointint—
gravityfloat—
SetJointGravityDirectionvoid
# SetJointGravityDirection
C#
public void SetJointGravityDirection(int index, int joint, Vector3 gravityDirection);

Sets the gravity direction at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true.

Parameters
NameTypeDefault
indexint—
jointint—
gravityDirectionVector3—
SetJointRadiusvoid
# SetJointRadius
C#
public void SetJointRadius(int index, int joint, float radius);

Sets the joint radius at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true.

Parameters
NameTypeDefault
indexint—
jointint—
radiusfloat—
SetJointRotationAxis2 overloads
# SetJointRotationAxis · 1/2
C#
public void SetJointRotationAxis(int index, int joint, SkeletonModifier3D.RotationAxis axis);

Sets the rotation axis at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true. The axes are based on the reference pose's space, if axis is SkeletonModifier3D.RotationAxis.Custom, you can specify any axis. In here, the reference pose is the bone pose immediately before the simulation. Note: The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since SpringBoneSimulator3D does not factor in twisting forces.

Parameters
NameTypeDefault
indexint—
jointint—
axisSkeletonModifier3D.RotationAxis—
# SetJointRotationAxis · 2/2
C#
public void SetJointRotationAxis(int index, int joint, int axis);

Sets the rotation axis at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true. The axes are based on the reference pose's space, if axis is SkeletonModifier3D.RotationAxis.Custom, you can specify any axis. In here, the reference pose is the bone pose immediately before the simulation. Note: The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since SpringBoneSimulator3D does not factor in twisting forces.

Parameters
NameTypeDefault
indexint—
jointint—
axisint—
SetJointRotationAxisVectorvoid
# SetJointRotationAxisVector
C#
public void SetJointRotationAxisVector(int index, int joint, Vector3 vector);

Sets the rotation axis vector for the specified joint in the bone chain. This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. If the vector length is 0, it is considered synonymous with SkeletonModifier3D.RotationAxis.All.

Parameters
NameTypeDefault
indexint—
jointint—
vectorVector3—
SetJointStiffnessvoid
# SetJointStiffness
C#
public void SetJointStiffness(int index, int joint, float stiffness);

Sets the stiffness force at joint in the bone chain's joint list when SpringBoneSimulator3D.IsConfigIndividual is true.

Parameters
NameTypeDefault
indexint—
jointint—
stiffnessfloat—
SetMutableBoneAxesvoid
# SetMutableBoneAxes
C#
public void SetMutableBoneAxes(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetRadiusvoid
# SetRadius
C#
public void SetRadius(int index, float radius);

Sets the joint radius of the bone chain. It is used to move and slide with the SpringBoneCollision3D in the collision list. The value is scaled by SpringBoneSimulator3D.SetRadiusDampingCurve and cached in each joint setting in the joint list.

Parameters
NameTypeDefault
indexint—
radiusfloat—
SetRadiusDampingCurvevoid
# SetRadiusDampingCurve
C#
public void SetRadiusDampingCurve(int index, Curve curve);

Sets the joint radius damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
curveCurve—
SetRootBonevoid
# SetRootBone
C#
public void SetRootBone(int index, int bone);

Sets the root bone index of the bone chain.

Parameters
NameTypeDefault
indexint—
boneint—
SetRootBoneNamevoid
# SetRootBoneName
C#
public void SetRootBoneName(int index, string boneName);

Sets the root bone name of the bone chain.

Parameters
NameTypeDefault
indexint—
boneNamestring—
SetRotationAxis2 overloads
# SetRotationAxis · 1/2
C#
public void SetRotationAxis(int index, SkeletonModifier3D.RotationAxis axis);

Sets the rotation axis of the bone chain. If set to a specific axis, it acts like a hinge joint. The value is cached in each joint setting in the joint list. The axes are based on the reference pose's space, if axis is SkeletonModifier3D.RotationAxis.Custom, you can specify any axis. In here, the reference pose is the bone pose immediately before the simulation. Note: The rotation axis vector and the forward vector shouldn't be colinear to avoid unintended rotation since SpringBoneSimulator3D does not factor in twisting forces.

Parameters
NameTypeDefault
indexint—
axisSkeletonModifier3D.RotationAxis—
# SetRotationAxis · 2/2
C#
public void SetRotationAxis(int index, int axis);

Sets the rotation axis of the bone chain. If set to a specific axis, it acts like a hinge joint. The value is cached in each joint setting in the joint list. The axes are based on the reference pose's space, if axis is SkeletonModifier3D.RotationAxis.Custom, you can specify any axis. In here, the reference pose is the bone pose immediately before the simulation. Note: The rotation axis vector and the forward vector shouldn't be colinear to avoid unintended rotation since SpringBoneSimulator3D does not factor in twisting forces.

Parameters
NameTypeDefault
indexint—
axisint—
SetRotationAxisVectorvoid
# SetRotationAxisVector
C#
public void SetRotationAxisVector(int index, Vector3 vector);

Sets the rotation axis vector of the bone chain. The value is cached in each joint setting in the joint list. This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. If the vector length is 0, it is considered synonymous with SkeletonModifier3D.RotationAxis.All.

Parameters
NameTypeDefault
indexint—
vectorVector3—
SetSettingCountvoid
# SetSettingCount
C#
public void SetSettingCount(int count);
Parameters
NameTypeDefault
countint—
SetStiffnessvoid
# SetStiffness
C#
public void SetStiffness(int index, float stiffness);

Sets the stiffness force of the bone chain. The greater the value, the faster it recovers to its initial pose. If stiffness is 0, the modified pose will not return to the original pose. The value is scaled by SpringBoneSimulator3D.SetStiffnessDampingCurve and cached in each joint setting in the joint list.

Parameters
NameTypeDefault
indexint—
stiffnessfloat—
SetStiffnessDampingCurvevoid
# SetStiffnessDampingCurve
C#
public void SetStiffnessDampingCurve(int index, Curve curve);

Sets the stiffness force damping curve of the bone chain.

Parameters
NameTypeDefault
indexint—
curveCurve—

SpringBoneSimulator3D.CenterFrom

ValueDescription
Bone = 2

The bone pose origin of the parent Skeleton3D specified by SpringBoneSimulator3D.SetCenterBone is defined as center. If Entity3D is not found, the parent Skeleton3D is treated as center.

Node = 1

The Entity3D specified by SpringBoneSimulator3D.SetCenterEntity is defined as center. If Entity3D is not found, the parent Skeleton3D is treated as center.

WorldOrigin = 0

The world origin is defined as center.

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.