2017.1.3p1

999825

No

[Animation] Animator Transition does not get interrupted

Steps to reproduce:
1. Open user attached project
2. Open scene_Crossfade.unity
3. In the Cotroller.cs script, notice that at frame 30 the hard coded transition starts, at frame 33 "AbilityIndex" is set to 2, "AbilityChange" is called
4. Hit play
5. Observe the logs and notice that at frame 33 transition does not get interrupted

Actual result: transition is not interrupted
Expected result: two parameters that are updated should cause the current transition to be interrupted

Comments (13)

simonbz

Sep 25, 2018 21:48

Hi there! Seeing as there are a lot of comments on this issue, I think it would be good to forward the response we gave to the user when we resolved this.

Here goes:
"Calling Animator.CrossFade or Animator.CrossFadeInFixedTime creates a dynamic transition from the current state to the state specified in parameter. This transition does not set an interruption source and cannot be interrupted by the state machine.

To do this, you can call Animator.Play(stateName) to interrupt the CrossFade and force the state machine back to a known state from which you will be able to evaluate the state machine parameters.

Alternatively, you can also call Animator.CrossFade with a small deltaTime to transition from the current pose back to a known state and let the state machine evaluate its parameters from there."