Hi man, you have the wrong thumbnail in the previous video. It says "vertical movement". Also hope you will make a player state machine for moving, idle, jumping, falling, etc? Too many tutorials out there put the movement code all in one place, which is not ideal. If it requires a different sprite, then it should be a different state.
You would need to have a state machine for that and split the "fly" phase into down and up if the animations are static (no leaning in for a jump etc.). Else you need to take animation ending also into account if these are animated aswell. Also if you want to be really fancy you can have a jump off state, a fly state and a about to land state which does look neat but is a bit more complicated. I will cover your topic once I implement a state machine in this series. So if you can hold off a few day, I will cover that.
Hi man, you have the wrong thumbnail in the previous video. It says "vertical movement".
Also hope you will make a player state machine for moving, idle, jumping, falling, etc? Too many tutorials out there put the movement code all in one place, which is not ideal. If it requires a different sprite, then it should be a different state.
Eh, .... Yeah, your right. Thanks for pointing it out, changed it. State machines will come later to structure it all.
Hey! How would you code it if you needed to account for a separate jump animation and a fall animation?
You would need to have a state machine for that and split the "fly" phase into down and up if the animations are static (no leaning in for a jump etc.). Else you need to take animation ending also into account if these are animated aswell. Also if you want to be really fancy you can have a jump off state, a fly state and a about to land state which does look neat but is a bit more complicated.
I will cover your topic once I implement a state machine in this series. So if you can hold off a few day, I will cover that.
!