Home > Back-end >  Create Jumping Animation in Unity
Create Jumping Animation in Unity

Time:07-27

I want to create jumping animation from 2 sprites 1 and2.
The animation can be illustrated like thisenter image description here
When his position is at the highest value, he changes state. Then keep that state until he falls off and changes to idle state.
I have done research, watched tutorials on youtube, and I found something called blend tree. Then I went to the Unity documentation website and my mind was spinning around and around, I just couldn't understand it. And is there any way to know when his position is at the highest value? or any solution to animate him?
And also, a link to the tutorial

CodePudding user response:

I would work with velocity conditions. Let's say you start with an idle animation as default. Then you make a transition from animation "idle" to animation "jumping" with the conditions IsGrounded = false to check if you're at the ground and velocityY > 0 to check if you're jumping or not.

Then do another transition from "jumping" to "landing" with the conditions IsGrounded = false and VelocityY < 0 so it checks if you're falling and will change the animation to the landing animation.

  • Related