Sequence AnimatorAudioState BUG

CSC

Member
1. Third Person Controller;

2. Unity 3.4f1;

3. Description:


In the demo scene, pick up the sword and set the sequence reset delay to 0.5s.
( This situation may happen at any reset delay, for example, it is set to 1.5s, just wait for 1s after the first attack would have the same situaiton)
Try to click the mouse quickly, most of the time the combo performs smoothly, but if you click the mouse some point around the red point, it get stuck.
I think the situation happens because the substate get reset but there is no way around from substate 2 to itself.
Or maybe it's that the transition is set to before the UseCompleteEvent and when you click attack, it has passed the transition point.(Sorry, i don't understand the animation quite well)

4. Possible solution:

This situation happens only in the first attack, so set the same animation state which has exit time at the end of animation and after the UseComplete Event, Most of the time it won't be active, but if something happens similar to this situation, it has someway to go to, and can exit Complete Use Event through the additional animation.

Set the addtional animation transition back to the original animation at start, so next combo can be performed. And the exit condition of the additional animation is just the same as the original one.

Sorry about poor English, I tried to explain as my best.
 

Attachments

  • sequence bug.png
    sequence bug.png
    771.5 KB · Views: 5
  • possible solution.png
    possible solution.png
    38 KB · Views: 5
Last edited:
The sword animator isn't setup to be able to handle that reset delay so that's why the animation is getting stuck. In order to fix this you'll need to setup the transitions so it accounts for the index being reset back to 0 and not having a combo.
 
I think one way to solve this problem is to set m_Endtime = Time. time in OnAnimatorUse Event.
So I create a new selector called Combo Sequence, and I subclass the Use Ability to create a new ability called Attack.
Within the Use Event, I use m_UsableItems to set the EndTime of the Combo Sequence. And in doing so, no need to change any animation transition as long as the reset delay is longer than the time between Use Event and Complete Event, and it worked quite well. Any recommandation to do it better? Thanks!
 
But the animator gets stuck at substate 2, not 0
You are getting stuck within the substate 2 transition because the parameter value changed mid-transition. You can enable logging on the Animator Monitor to see exactly when the parameter values change.

I think one way to solve this problem is to set m_Endtime = Time. time in OnAnimatorUse Event.
So I create a new selector called Combo Sequence, and I subclass the Use Ability to create a new ability called Attack.
Within the Use Event, I use m_UsableItems to set the EndTime of the Combo Sequence. And in doing so, no need to change any animation transition as long as the reset delay is longer than the time between Use Event and Complete Event, and it worked quite well. Any recommandation to do it better? Thanks!
That's awesome that you got a solution. Sounds like it should work!
 
Top