Version: 1.8
LanguageEnglish
  • C#

Animator.TriggerMotionWarp

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

Declaration

public bool TriggerMotionWarp(string stateName, float fixedTransitionDuration);

Declaration

public bool TriggerMotionWarp(string stateName, float fixedTransitionDuration, float fixedTimeOffset = 0.0f, float normalizedTransitionTime = 0.0f);

Parameters

stateName The name of the state to trigger motion warping for.
fixedTransitionDuration The duration of the transition to the state where motion warp is triggered.
fixedTimeOffset The time offset for the transition.
normalizedTransitionTime The normalized time for the transition.
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.

Returns

bool true if the motion warp was successfully triggered; otherwise, false.

Description

Activates motion warping for the specified state with the provided targets or the targets from previous calls to SetMotionWarpTargets.

TriggerMotionWarp activates motion warping for the specified state. It can be called with either Transform targets or position/rotation targets. This method immediately initiates the motion warping process for the specified state.