- Home /
Use Mecanim Transition as Trigger
Is there a way to use a mecanim transition between states as a trigger?
I have a character that runs and jumps, but when he runs on a concave surface, the jump animation does not finish and the jump state never gets returned to false, so the character continues to jump. However, I noticed the mecanim transition from jump back to run plays, so maybe I can use this as a trigger? many thanks!
Put an Exit Time parameter in the Jump animation, or something to that effect just in case :)
I found that sometimes $$anonymous$$ecanim transitions and whatever is going on in the script sometimes don't match! You have to be extra careful to set/clear your boolean flags and think of logic involved when Leaving certain states.
There is already an exit timer, which per your advice I tried adjusting with no success.
So the logic I'm using is to have the character enter the jump animation when a button is triggered (from mecanim tutorial) then as soon as the jump animation is no longer in transition for the state to be returned to false.
In debugging I see that the character never enters the jump state, but is always in the motion state (although the game view window and animator show the character is jumping). So now I'm thinking it is my code.
Your answer
Follow this Question
Related Questions
Mechanim Trigger Issue 1 Answer
Mecanim new Trigger parameter explanation? 1 Answer