Hey everyone, I’m having a bear of a time trying to figure out some basic jumping with animation states. I have movement and basic attacks down pretty easily, jumping is proving far more difficult.
I have an Idle and Run state and inside both I have code to transition to the Jump state:
if (Input.GetButtonDown("Jump"))
{
animator.SetTrigger("Jump");
}
from here I move to the Jump state, but I can’t seem to get my player to move up. I have found tons of different codes online but none seem to work right with animation states. I am not sure how I would go about adding the force needed to make my player jump up. Any ideas? Should I make a separate state for jumping and falling or should I just put the code into my Running/Idle states instead?
After the Jump state I transition to a Falling state, then back to Idle. The Falling state is where I want to put all the data for gravity and falling. Especially since it will work well for having players just run or fall I can easily transition into this state.