Version: 1.8
LanguageEnglish
  • C#

AnimationFacingWarpPlayable

struct in UnityEngine.Animations

/

Implemented in:UnityEngine.AnimationModule


Implements interfaces:IPlayable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A Playable that warps character facing to align with locomotion, distributing twist across a configurable spine chain for natural turning.

This playable supports two input modes: 1) Direction: provide the locomotion direction in world space or character local space as the target locomotion direction. 2) Angle: provide a target angle (in degrees) directly. The rotation can optionally redirect Root Motion. If enable useRootMotion, in the character space, calculate the direction of rotating the LocomotionAngle of the forwardDirection(+z) along the RotationAxis as the target locomotion direction.

Static Properties

NullReturns a null AnimationFacingWarpPlayable.

Public Methods

AddSpineBoneAdds a spine bone to the distribution chain.
GetInputModeGets the current input mode.
GetInterpRotationSpeedGets the interpolation speed.
GetKeepCurrentWarpingReturns whether to keep current warping state.
GetLocomotionAngleGets the current target turn angle (degrees) for Angle mode.
GetLocomotionDirectionGets the current locomotion direction input.
GetMaxRotationAngleGets the maximum target angle clamp (degrees).
GetMaxRotationSpeedGets the maximum rotation speed in degrees/second.
GetNodeWeightReturns the current node weight.
GetRootBoneGets the configured root bone name.
GetRotationAxisGets the current rotation axis.
GetSmoothTimeGets the smoothing time.
GetSpineBonesGets the configured spine bones and weights.
GetSpineBoneWeightGets the weight of a specific spine bone by name.
GetUseGlobalSpaceForDirectionGets whether global space or local space is used for direction input.
GetUseRootMotionReturns whether Root Motion redirection is enabled.
GetUseSmoothDampingReturns whether smooth damp or exponential decay interpolation is used for rotation smoothing.
GetWarpingOffsetAngleReturns the current warping offset angle.
RemoveSpineBoneRemoves a spine bone from the distribution chain.
SetDirectionInputProvides locomotion and whether to use global space for Direction input mode.
SetInputModeSets how the target movement direction is provided (Direction or Angle).
SetInterpRotationSpeedSets the exponential decay interpolation speed.
SetKeepCurrentWarpingIf enabled, keeps the current warping state.
SetLocomotionAngleSets the target turn angle (degrees) for Angle mode.
SetLocomotionDirectionSets the locomotion direction for Direction mode.
SetMaxRotationAngleSets the clamp for target turn angle(degrees).
SetMaxRotationSpeedSets the maximum rotation speed in degrees/second.
SetNodeWeightSets the blend weight for mixing between the input animation and the warp result.
SetRootBoneDefines the root bone to rotate so the character's movement direction is steered toward the desiredDirection; typically "Hips" or "Pelvis".
SetRotationAxisThe axis to rotate around when warping the character to move forward to the target locomotion direction but face another direction (commonly Y).
SetSmoothTimeSets the smooth time used by a SmoothDamp-style filter to stabilize warp velocity.
SetSpineBonesSets the spine bones and their weights used to distribute counter-twist.
SetSpineBoneWeightUpdates the weight of a specific spine bone.
SetUseGlobalSpaceForDirectionSets whether to use global space for direction input.
SetUseRootMotionEnables redirecting Root Motion according to the computed facing warp.
SetUseSmoothDampingIf true, uses SmoothDamp for rotation smoothing. If false, uses exponential decay interpolation.
SetWarpingOffsetAngleSets an additional offset (in degrees) added to the computed target turn angle around the configured RotationAxis, to bias the final facing relative to the locomotion direction.

Static Methods

CreateCreates an AnimationFacingWarpPlayable in the PlayableGraph.