You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the player jitter is coming from your grounded logic, and the subsequent corrections to player pos in the collision loops.
I tinkered with it for a while, if you stop applying gravity once you're rested on a surface you can keep the player jitter free, however you have to find the right place in your game loop to change the grounded to false if the player steps off a surface or jumps. (Jump is the easy one out of the two)
Thanks for the comment! The reason I was re-enabling movement after 7 ticks was so that if you were up against say a 1 block high wall, you could jump whilst holding left or right to pass it. Subsequently it allows you to occasionally stick to walls. Despite it's flaws, personally I prefer the current system. If you have any ideas on how to incorporate both mechanics, I would love to hear about them!
Firstly Physics is hard..
I think the player jitter is coming from your grounded logic, and the subsequent corrections to player pos in the collision loops.
I tinkered with it for a while, if you stop applying gravity once you're rested on a surface you can keep the player jitter free, however you have to find the right place in your game loop to change the grounded to false if the player steps off a surface or jumps. (Jump is the easy one out of the two)
I'm happy to help!
I found your game listed on https://www.pygame.org/news and popped in to check it out earlier.
The text was updated successfully, but these errors were encountered: