Version: 1.8
LanguageEnglish
  • C#

Animator.SetMotionWarpTargets(string,params (string,Transform)[])

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

Switch to Manual

Parameters

stateName The name of the state that contains the animation intervals.
targets An array of tuples containing interval names and their respective Transform targets.
targetPosition The position to use as the motion warp target.
targetRotation The rotation to use as the motion warp target.

Description

Sets multiple motion warp targets for a specific state without triggering the motion warp.

SetMotionWarpTargets assigns multiple targets for motion warping in a specific state. You can specify either a Transform target or a position and rotation target. This method only prepares the targets but does not activate the motion warping process. You must call TriggerMotionWarp separately to start the motion warping.