And what exactly do you perceive as gravity here?
- If you press any key associated with the InputAction called "droite", the player's velocity in x-direction is set to 5 * -750 = -3750, so the player will move to the left (which feels a bit weird, given that "droite" means "right" in french).
- If you don't press any key associated with "droite", the script will go on and check if you press any key associated with "gauche" and if that's the case, the player will move to the right with a velocity of 3750 in x-direction.
- If you don't press any key associated with neither "droite" nor "gauche", but a key associated with "ui_up" the player's velocity is set to 3750 in y-direction. The positive y-direction is pointing downwards, so the player will "fall". That's not gravity though, but a misunderstanding on your side at most.
You don't reset the velocity back to zero when none of these keys are pressed, which may or may not be intended. Also you're not multiplying the velocity with
delta, so your character will move extremely fast on high FPS and slower on lower FPS.