I have a simple test animator controller for variable jumps in a 2d platformer using root motion. My problem is that I have a jump state which will exit to a Jump Cap state that kills the player’s upward velocity and then returns to idle (I’ll be replacing the Jump Cap state with a StateMachineBehaviour script attached to the Jump state).
The Jump state should exit either when it plays all the way through (exit time of 1) or when it gets a Jump Cancel trigger. The Jump Cancel should exit the state early, but still have an exit time of 0.5 or whatever value so I can set a minimum jump.
I have 2 transitions exiting the Jump state:
The issue I’m running in to is that what actually happens is that I can tap the jump key and do a minimum jump if I release the jump key and send the Jump Cancel trigger before the exit time for the Jump Cancel transition. I end up with either a minimum jump or a maximum jump, but not anything in between.
Basically, the Jump Cancel transition only works if it receives the trigger before the exit time. If it gets the trigger after the exit time it doesn’t do anything, and this isn’t what I need.
If I disable the exit time for the Jump Cancel transition it allows me to do a variable jump how I want, but it doesn’t allow me to jump at least a minimum amount before exiting.