SkeletonModifier3D
A node that may modify a Skeleton3D's bones.
A node that may modify a Skeleton3D's bones.
SkeletonModifier3D retrieves a target Skeleton3D by having a Skeleton3D parent.
If there is an AnimationMixer, a modification always performs after playback process of the AnimationMixer.
This node should be used to implement custom IK solvers, constraints, or skeleton physics.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
SkeletonModifier3DConstructor
public SkeletonModifier3D();Properties2
ActiveProperty
public bool Active { get; set; }If true, the SkeletonModifier3D will be processing.
InfluenceProperty
public float Influence { get; set; }Sets the influence of the modification.
Note: This value is used by Skeleton3D to blend, so the SkeletonModifier3D should always apply only 100% of the result without interpolation.
Methods9
GetInfluencefloat
public float GetInfluence();floatGetSkeletonSkeleton3D
public Skeleton3D GetSkeleton();Returns the parent Skeleton3D node if it exists. Otherwise, returns null.
Skeleton3DIsActivebool
public bool IsActive();boolSetActivevoid
public void SetActive(bool active);| Name | Type | Default |
|---|---|---|
active | bool | — |
SetInfluencevoid
public void SetInfluence(float influence);| Name | Type | Default |
|---|---|---|
influence | float | — |
_ProcessModificationvoid · Deprecated
public virtual void _ProcessModification();Override this virtual method to implement a custom skeleton modifier. You should do things like get the Skeleton3D's current pose and apply the pose here.
SkeletonModifier3D._ProcessModification must not apply SkeletonModifier3D.Influence to bone poses because the Skeleton3D automatically applies influence to all bone poses set by the modifier.
_ProcessModificationWithDeltavoid
public virtual void _ProcessModificationWithDelta(double delta);Override this virtual method to implement a custom skeleton modifier. You should do things like get the Skeleton3D's current pose and apply the pose here.
SkeletonModifier3D._ProcessModificationWithDelta must not apply SkeletonModifier3D.Influence to bone poses because the Skeleton3D automatically applies influence to all bone poses set by the modifier.
delta is passed from parent Skeleton3D. See also Skeleton3D.Advance.
Note: This method may be called outside Entity._Process and Entity._PhysicsProcess with delta is 0.0, since the modification should be processed immediately after initialization of the Skeleton3D.
| Name | Type | Default |
|---|---|---|
delta | double | — |
_SkeletonChangedvoid
public virtual void _SkeletonChanged(Skeleton3D oldSkeleton, Skeleton3D newSkeleton);Called when the skeleton is changed.
| Name | Type | Default |
|---|---|---|
oldSkeleton | Skeleton3D | — |
newSkeleton | Skeleton3D | — |
_ValidateBoneNamesvoid
public virtual void _ValidateBoneNames();Called when bone names and indices need to be validated, such as when entering the scene tree or changing skeleton.
Signals and events1
ModificationProcessedEvent
public event Action ModificationProcessed;Notifies when the modification have been finished.
Note: If you want to get the modified bone pose by the modifier, you must use Skeleton3D.GetBonePose or Skeleton3D.GetBoneGlobalPose at the moment this signal is fired.
SkeletonModifier3D.BoneAxis
| Value | Description |
|---|---|
MinusX = 1 | Enumerated value for the -X axis. |
MinusY = 3 | Enumerated value for the -Y axis. |
MinusZ = 5 | Enumerated value for the -Z axis. |
PlusX = 0 | Enumerated value for the +X axis. |
PlusY = 2 | Enumerated value for the +Y axis. |
PlusZ = 4 | Enumerated value for the +Z axis. |
SkeletonModifier3D.BoneDirection
| Value | Description |
|---|---|
FromParent = 6 | Enumerated value for the axis from a parent bone to the child bone. |
MinusX = 1 | Enumerated value for the -X axis. |
MinusY = 3 | Enumerated value for the -Y axis. |
MinusZ = 5 | Enumerated value for the -Z axis. |
PlusX = 0 | Enumerated value for the +X axis. |
PlusY = 2 | Enumerated value for the +Y axis. |
PlusZ = 4 | Enumerated value for the +Z axis. |
SkeletonModifier3D.RotationAxis
| Value | Description |
|---|---|
All = 3 | Enumerated value for the unconstrained rotation. |
Custom = 4 | Enumerated value for an optional rotation axis. |
X = 0 | Enumerated value for the rotation of the X axis. |
Y = 1 | Enumerated value for the rotation of the Y axis. |
Z = 2 | Enumerated value for the rotation of the Z axis. |
SkeletonModifier3D.SecondaryDirection
| Value | Description |
|---|---|
Custom = 7 | Enumerated value for an optional axis. |
MinusX = 2 | Enumerated value for the -X axis. |
MinusY = 4 | Enumerated value for the -Y axis. |
MinusZ = 6 | Enumerated value for the -Z axis. |
None = 0 | Enumerated value for the case when the axis is undefined. |
PlusX = 1 | Enumerated value for the +X axis. |
PlusY = 3 | Enumerated value for the +Y axis. |
PlusZ = 5 | Enumerated value for the +Z axis. |