To be fair, it’s been monthes since I managed to resolve the player jumping ><
I tried tweening the jump, and wasn’t sure what aspect should I manouver around.
Finally I turned to the Godot discord server. The devs there were amazing and helped me figure out a simple solution.
Essentially, when pressing the “jump” button, I create a jump_tween, then I shift the sprite in a fixed height and duration. After a set jump time, I shift the sprite back in place and everything is right in this world!
Let’s breakdown the jumping code:

First of all we can see that the player now has a state. This state will help me later on different manouvers, finish celeberation etc.
So, if the player state is not normal, which means running down the hill, the player can’t jump.
When jump is available, I first set the state to “IN_AIR”. This prevents collisions with the dirt_mound:

Once state is set, I determine if the player is turning left or right while jump was pressed.
This is used to determine which direction should the sprite be shifted towards.
The next 4 lines are the full jump animation.
First, I create the tween instance, then I tween the sprite’s y position by the jump height.
Note that the animation duration is a variable called JUMP_ACCEND_SEC.
Once accended, I hold the tweenfor the jump’s hold time, this is essentially the jump’s peek hold time.
Lastly, I decend by setting the sprite’s position to the initial y position.
Again, note that the decend time has a seperate variable named JUMP_DECEND_SEC.
The last few lines are a reset of the player state, which is delayed by the total jump time (accend+hold+decend).
Finally, to make the jump visible, I added a black rectangle behind the sprite, to represent a shadow (which is not animated). This worked perfectly!
