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?

P#147459 2024-04-27 21:57 ( Edited 2024-04-27 21:58)

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

P#147461 2024-04-27 21:59
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.

P#147466 2024-04-28 00:57
1

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

P#147468 2024-04-28 01:22

[Please log in to post a comment]