Adding a Jump Animation
A jump animation can be broken down into 3 parts, the leap, the in air, and the landing. This can be done in a circular pattern with a landing bool. First, let’s add in our animations. Cut them up into 3 sections — The jump start, hold, and end. Link them together on the idle.
Create a bool for the jump. In our idle, when we set to true, do the jump start to hold, then when we land play the jump end and set back to false. Create 2 functions — jumping and jump landed- this can also be grounded or not grounded. All they do is change the animation state.
Next, in your First Person Controller, let’s add 2 bool statement checks. One when you start jumping and one when you land.
Now you have to go back to your animations and make sure the roots for the rotation and transform are baked in. Now you should be able to jump. It looks a little wonky due to it being a jump animation and not 3 separate real animations with no Y value change, but it works.