SpringBoneSimulator3D
A SkeletonModifier3D to apply inertial wavering to bone chains.
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
public SpringBoneSimulator3D();Properties3
ExternalForceProperty
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
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
public int SettingCount { get; set; }The number of settings.
Methods86
AreAllChildCollisionsEnabledbool
public bool AreAllChildCollisionsEnabled(int index);Returns true if all child SpringBoneCollision3Ds are contained in the collision list at index in the settings.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolAreBoneAxesMutablebool
public bool AreBoneAxesMutable();boolClearCollisionsvoid
public void ClearCollisions(int index);Clears all collisions from the collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.
| Name | Type | Default |
|---|---|---|
index | int | — |
ClearExcludeCollisionsvoid
public void ClearExcludeCollisions(int index);Clears all exclude collisions from the collision list at index in the settings when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
ClearSettingsvoid
public void ClearSettings();Clears all settings.
GetCenterBoneint
public int GetCenterBone(int index);Returns the center bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetCenterBoneNamestring
public string GetCenterBoneName(int index);Returns the center bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetCenterEntityEntityPath
public EntityPath GetCenterEntity(int index);Returns the center node path of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
EntityPathGetCenterFromSpringBoneSimulator3D.CenterFrom
public SpringBoneSimulator3D.CenterFrom GetCenterFrom(int index);Returns what the center originates from in the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
SpringBoneSimulator3D.CenterFromGetCollisionCountint
public int GetCollisionCount(int index);Returns the collision count of the bone chain's collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is false.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetCollisionPathEntityPath
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
collision | int | — |
EntityPathGetDragfloat
public float GetDrag(int index);Returns the drag force damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetDragDampingCurveCurve
public Curve GetDragDampingCurve(int index);Returns the drag force damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
CurveGetEndBoneint
public int GetEndBone(int index);Returns the end bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetEndBoneDirectionSkeletonModifier3D.BoneDirection
public SkeletonModifier3D.BoneDirection GetEndBoneDirection(int index);Returns the tail direction of the end bone of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
SkeletonModifier3D.BoneDirectionGetEndBoneLengthfloat
public float GetEndBoneLength(int index);Returns the end bone tail length of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetEndBoneNamestring
public string GetEndBoneName(int index);Returns the end bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetExcludeCollisionCountint
public int GetExcludeCollisionCount(int index);Returns the exclude collision count of the bone chain's exclude collision list when SpringBoneSimulator3D.AreAllChildCollisionsEnabled is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetExcludeCollisionPathEntityPath
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
collision | int | — |
EntityPathGetExternalForceVector3
public Vector3 GetExternalForce();Vector3GetGravityfloat
public float GetGravity(int index);Returns the gravity amount of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetGravityDampingCurveCurve
public Curve GetGravityDampingCurve(int index);Returns the gravity amount damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
CurveGetGravityDirectionVector3
public Vector3 GetGravityDirection(int index);Returns the gravity direction of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
Vector3GetJointBoneint
public int GetJointBone(int index, int joint);Returns the bone index at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
intGetJointBoneNamestring
public string GetJointBoneName(int index, int joint);Returns the bone name at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
stringGetJointCountint
public int GetJointCount(int index);Returns the joint count of the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetJointDragfloat
public float GetJointDrag(int index, int joint);Returns the drag force at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
floatGetJointGravityfloat
public float GetJointGravity(int index, int joint);Returns the gravity amount at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
floatGetJointGravityDirectionVector3
public Vector3 GetJointGravityDirection(int index, int joint);Returns the gravity direction at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
Vector3GetJointRadiusfloat
public float GetJointRadius(int index, int joint);Returns the radius at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
floatGetJointRotationAxisSkeletonModifier3D.RotationAxis
public SkeletonModifier3D.RotationAxis GetJointRotationAxis(int index, int joint);Returns the rotation axis at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
SkeletonModifier3D.RotationAxisGetJointRotationAxisVectorVector3
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).
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
Vector3GetJointStiffnessfloat
public float GetJointStiffness(int index, int joint);Returns the stiffness force at joint in the bone chain's joint list.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
floatGetRadiusfloat
public float GetRadius(int index);Returns the joint radius of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetRadiusDampingCurveCurve
public Curve GetRadiusDampingCurve(int index);Returns the joint radius damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
CurveGetRootBoneint
public int GetRootBone(int index);Returns the root bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
intGetRootBoneNamestring
public string GetRootBoneName(int index);Returns the root bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetRotationAxisSkeletonModifier3D.RotationAxis
public SkeletonModifier3D.RotationAxis GetRotationAxis(int index);Returns the rotation axis of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
SkeletonModifier3D.RotationAxisGetRotationAxisVectorVector3
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).
| Name | Type | Default |
|---|---|---|
index | int | — |
Vector3GetSettingCountint
public int GetSettingCount();intGetStiffnessfloat
public float GetStiffness(int index);Returns the stiffness force of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
floatGetStiffnessDampingCurveCurve
public Curve GetStiffnessDampingCurve(int index);Returns the stiffness force damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
CurveIsConfigIndividualbool
public bool IsConfigIndividual(int index);Returns true if the config can be edited individually for each joint.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolIsEndBoneExtendedbool
public bool IsEndBoneExtended(int index);Returns true if the end bone is extended to have a tail.
| Name | Type | Default |
|---|---|---|
index | int | — |
boolResetvoid
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
public void SetCenterBone(int index, int bone);Sets the center bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
bone | int | — |
SetCenterBoneNamevoid
public void SetCenterBoneName(int index, string boneName);Sets the center bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneName | string | — |
SetCenterEntityvoid
public void SetCenterEntity(int index, EntityPath entityPath);Sets the center node path of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
entityPath | EntityPath | — |
SetCenterFromvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
centerFrom | SpringBoneSimulator3D.CenterFrom | — |
SetCollisionCountvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
count | int | — |
SetCollisionPathvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
collision | int | — |
entityPath | EntityPath | — |
SetDragvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
drag | float | — |
SetDragDampingCurvevoid
public void SetDragDampingCurve(int index, Curve curve);Sets the drag force damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
curve | Curve | — |
SetEnableAllChildCollisionsvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetEndBonevoid
public void SetEndBone(int index, int bone);Sets the end bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
bone | int | — |
SetEndBoneDirection2 overloads
public void SetEndBoneDirection(int index, SkeletonModifier3D.BoneDirection boneDirection);Sets the end bone tail direction of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneDirection | SkeletonModifier3D.BoneDirection | — |
public void SetEndBoneDirection(int index, int boneDirection);Sets the end bone tail direction of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneDirection | int | — |
SetEndBoneLengthvoid
public void SetEndBoneLength(int index, float length);Sets the end bone tail length of the bone chain when SpringBoneSimulator3D.IsEndBoneExtended is true.
| Name | Type | Default |
|---|---|---|
index | int | — |
length | float | — |
SetEndBoneNamevoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneName | string | — |
SetExcludeCollisionCountvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
count | int | — |
SetExcludeCollisionPathvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
collision | int | — |
entityPath | EntityPath | — |
SetExtendEndBonevoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetExternalForcevoid
public void SetExternalForce(Vector3 force);| Name | Type | Default |
|---|---|---|
force | Vector3 | — |
SetGravityvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
gravity | float | — |
SetGravityDampingCurvevoid
public void SetGravityDampingCurve(int index, Curve curve);Sets the gravity amount damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
curve | Curve | — |
SetGravityDirectionvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
gravityDirection | Vector3 | — |
SetIndividualConfigvoid
public void SetIndividualConfig(int index, bool enabled);If enabled is true, the config can be edited individually for each joint.
| Name | Type | Default |
|---|---|---|
index | int | — |
enabled | bool | — |
SetJointDragvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
drag | float | — |
SetJointGravityvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
gravity | float | — |
SetJointGravityDirectionvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
gravityDirection | Vector3 | — |
SetJointRadiusvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
radius | float | — |
SetJointRotationAxis2 overloads
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
axis | SkeletonModifier3D.RotationAxis | — |
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
axis | int | — |
SetJointRotationAxisVectorvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
vector | Vector3 | — |
SetJointStiffnessvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
joint | int | — |
stiffness | float | — |
SetMutableBoneAxesvoid
public void SetMutableBoneAxes(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetRadiusvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
radius | float | — |
SetRadiusDampingCurvevoid
public void SetRadiusDampingCurve(int index, Curve curve);Sets the joint radius damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
curve | Curve | — |
SetRootBonevoid
public void SetRootBone(int index, int bone);Sets the root bone index of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
bone | int | — |
SetRootBoneNamevoid
public void SetRootBoneName(int index, string boneName);Sets the root bone name of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
boneName | string | — |
SetRotationAxis2 overloads
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
axis | SkeletonModifier3D.RotationAxis | — |
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
axis | int | — |
SetRotationAxisVectorvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
vector | Vector3 | — |
SetSettingCountvoid
public void SetSettingCount(int count);| Name | Type | Default |
|---|---|---|
count | int | — |
SetStiffnessvoid
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.
| Name | Type | Default |
|---|---|---|
index | int | — |
stiffness | float | — |
SetStiffnessDampingCurvevoid
public void SetStiffnessDampingCurve(int index, Curve curve);Sets the stiffness force damping curve of the bone chain.
| Name | Type | Default |
|---|---|---|
index | int | — |
curve | Curve | — |
SpringBoneSimulator3D.CenterFrom
| Value | Description |
|---|---|
Bone = 2 | The bone pose origin of the parent |
Node = 1 | The |
WorldOrigin = 0 | The world origin is defined as center. |