Class reference
SkeletonModifier3D
Inherits Node3D
A node that may modify a Skeleton3D's bones.
Description
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.
Properties
bool active = true
bool active = trueIf true, the SkeletonModifier3D will be processing.
float influence = 1.0
float influence = 1.0Sets 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.
Methods
void _process_modification() virtual
Use _process_modification_with_delta() instead.
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. _process_modification() must not apply influence to bone poses because the Skeleton3D automatically applies influence to all bone poses set by the modifier.
void _process_modification_with_delta(float delta) virtual
float delta) virtualOverride 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. _process_modification_with_delta() must not apply 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 Node._process() and Node._physics_process() with delta is 0.0, since the modification should be processed immediately after initialization of the Skeleton3D.
void _skeleton_changed(Skeleton3D old_skeleton, Skeleton3D new_skeleton) virtual
Skeleton3D old_skeleton, Skeleton3D new_skeleton) virtualCalled when the skeleton is changed.
void _validate_bone_names() virtual
Called when bone name and index need to be validated such as the timing of the entering tree or changing skeleton.
Skeleton3D get_skeleton() const
Skeleton3D get_skeleton() constGet parent Skeleton3D node if found.
Signals
modification_processed()
Notifies when the modification have been finished. Note: If you want to get the modified bone pose by the modifier, you must use Skeleton3D.get_bone_pose() or Skeleton3D.get_bone_global_pose() at the moment this signal is fired.
Constants
BONE_AXIS_PLUS_X = 0
Enumerated value for the +X axis.
BONE_AXIS_MINUS_X = 1
Enumerated value for the -X axis.
BONE_AXIS_PLUS_Y = 2
Enumerated value for the +Y axis.
BONE_AXIS_MINUS_Y = 3
Enumerated value for the -Y axis.
BONE_AXIS_PLUS_Z = 4
Enumerated value for the +Z axis.
BONE_AXIS_MINUS_Z = 5
Enumerated value for the -Z axis.
BONE_DIRECTION_PLUS_X = 0
Enumerated value for the +X axis.
BONE_DIRECTION_MINUS_X = 1
Enumerated value for the -X axis.
BONE_DIRECTION_PLUS_Y = 2
Enumerated value for the +Y axis.
BONE_DIRECTION_MINUS_Y = 3
Enumerated value for the -Y axis.
BONE_DIRECTION_PLUS_Z = 4
Enumerated value for the +Z axis.
BONE_DIRECTION_MINUS_Z = 5
Enumerated value for the -Z axis.
BONE_DIRECTION_FROM_PARENT = 6
Enumerated value for the axis from a parent bone to the child bone.
SECONDARY_DIRECTION_NONE = 0
Enumerated value for the case when the axis is undefined.
SECONDARY_DIRECTION_PLUS_X = 1
Enumerated value for the +X axis.
SECONDARY_DIRECTION_MINUS_X = 2
Enumerated value for the -X axis.
SECONDARY_DIRECTION_PLUS_Y = 3
Enumerated value for the +Y axis.
SECONDARY_DIRECTION_MINUS_Y = 4
Enumerated value for the -Y axis.
SECONDARY_DIRECTION_PLUS_Z = 5
Enumerated value for the +Z axis.
SECONDARY_DIRECTION_MINUS_Z = 6
Enumerated value for the -Z axis.
SECONDARY_DIRECTION_CUSTOM = 7
Enumerated value for an optional axis.
ROTATION_AXIS_X = 0
Enumerated value for the rotation of the X axis.
ROTATION_AXIS_Y = 1
Enumerated value for the rotation of the Y axis.
ROTATION_AXIS_Z = 2
Enumerated value for the rotation of the Z axis.
ROTATION_AXIS_ALL = 3
Enumerated value for the unconstrained rotation.
ROTATION_AXIS_CUSTOM = 4
Enumerated value for an optional rotation axis.