How to Jump Faster?

C

ChrisMG12

Guest
I'm using code from this video,
Hello I'm a noob developer, and i am making a platformer. In this platformer i made an projectile that appears whenever i jump, however the jump reaches above the projectile too slowly, can anyone tell me what to change in the code so that my player goes up 90px almost instantly. If anyone is wondering I changed the variable grav(shown in the video )to 0.3 instead of 0.2.
Any sort of help would be appreciated, including tips on how to avoid this in the future.

Thanks and sorry for any disturbance.
 
C

ChrisMG12

Guest
oh yeah lemme try that
thanks
EDIT: I tried that but for some reason the grav doesnt work as well as before
 
F

FoldingFormula4

Guest
Your grav doesnt work as well as before because it takes longer for your vertical speed to move your player downwards.

Think about it like this, if your vertical speed is moving you 20 pixels upwards per second, and gravity can only slow your vertical speed 1 pixel per second downwards, it would take 20 seconds for your character to stop moving upwards and start moving downwards.
 
C

ChrisMG12

Guest
Yeah i get that part but is there any sort of calculation-y way to reach 90px in 1 second and reach ground in 2 secs and be able to go minimum 2-3x64 px horizontally
 
Last edited by a moderator:
Top