Hi,
I am developing a 2D platformer and I am working on the jumping mechanic.
I have used the v = u + at kinematic equation for the formula for a smooth jump.
When I run the game I am able to jump to the left (in the negative direction) smoothly with a gentle curve.
However, when I jump to the right (in the positive direction) the character teleports to the right rather than moving in a smooth gentle curve like when I jump to the left.
Here is the code snippet that handles the jumping:
self.velocity is applied in the update function and self.ground is set to false so the player cannot jump in the air.
self.direction is set when the player moves left or right to identify which way the player is wanting to jump.
Is there any reason for the changes in the jump between negative and positive x values?