It's a very slapdash fix, but it's a smoother jump. I suggest adding hitboxes for every side of the square so you can only use the bottom hitbox to check if it's touching the ground and you can use the side ones to check for a wall to jump off of (if you want that feature). Either way, velocity. Check inside for the code. Note: I also added an overhaul to the left and right sidescrolling movement that i planned on releasing as a separate project but i decided against that. Enjoy