Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | PugMasterPug |
I am making a platformer and I have noticed that many times when I jump, the height doesn’t seem to be consistent. Most of the times it jumps about the same height, but every once in a while it jumps considerably higher.
I assume this could be caused by the gravity being inconsistent. The way the game is programmed, when I jump, an upwards velocity is set to the player, and there’s always a gravity being added (which I multiply with delta), and when the player releases the jump button, a stronger gravity is applied.
I had a problem like this in the past, but it was fixed when I moved all the physics to physics_process().
Here is a minimal link to the project: https://github.com/PugMasterPug/test_platformer
Any help is appreciated.