Log In  


Cart #meeeeep-0 | 2024-04-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hi, so im trying to make a platfomer, but when you jump into a wall, a glitch happens, i slide into it and telepoet to the top, how do i make it better and more polished?



well its not so much a glitch just a mistake on my end


1

You are checking for left and right collision only at the player's y value, so when you jump and the top of the player (y value) sees it is open in that next tile over (not the one that most of their body is against), the player directly moves into that position.

While your jump key is modifying vy and then vy is getting applied to y later on, your left and right inputs are applying directly to x itself instead of vx.


1

ok, this helped a TON. thank you so much @keyboardonly!



[Please log in to post a comment]