So, I am trying to really perfect a home-built player class, and I’m trying to figure out how to sync a jump animation properly. I’m looking to see if there is an alternative way of doing this that is more effective, but this is what I’ve come up with so far:
- Have separate “jump up” and “fall” animation for each character.
- When the player’s y velocity is positive, play the “jump up” animation and freeze at the last frame.
- When player’s y velocity is negative, play “fall” animation and freeze at the last frame.
What do you guys think?
On a side note, the only time a player’s velocity will be positive is when he/she is jumping in my game. The same concept applies to when a player’s velocity will be negative.