0 votes

In my project If i press the jump button the player jumps a certain height. If I press and keep holding the jump button the player will keeping jumping more than the certain height. How can I stop it such that 1.when I press the jump button and 2.press and keep holding the jump button ; The player should jump the same height In both the situation (1 & 2).
Here is the Project

in Engine by (55 points)

1 Answer

0 votes

Well, as long as you keep the following lines:

if not jump_released:
    grav *= low_jump_gravity_scale

that won't change. You simply apply less gravity, when the player holds the up-key.

by (10,608 points)

I set the var low_jump_gravity_scale = 0.9. Now it is working fine.
Thank you.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.