I´ve successfully implemented functional doublejumping in my 2D platformer. However now i want to spice it up a bit and rotate the player during the second jump either 360 degrees or by using an animation player.
I have already tried both of these and they work BUT i only want the character to rotate when he is actually jumping in upwards direction (so basically velocity.y < 0).
And this is also easy to add with just another check, HOWEVER: Another problem arises. I want this animation / rotation to be completely done when the player is moving down (velocity.y >= 0) again.
How do i pull this off?
My Doublejump code:
(the comment there is what i want)
My character during the second jump when he should rotate: