Hello everyone,
Can someone please explain double jump physics to me? I am trying to code this as a special suit in my game. It works, but I’m not sure if it’s working as expected. The double jump height is different depending on when the double jump is initiated. If double jump is initiated before the peak of the first jump, the character jumps much higher than if double jump is initiated when the character is at the peak of or falling from the first jump.
Am I making sense? Could someone explain the physics to me and what the proper physics should be?
You can try it out on this demo I’ve been working on (a sidescrolling endless runner): http://fanqu.net/demo/. Click play to start the game, left mouse click or spacebar to jump. If you jump twice really quickly, you can see the cube jumps really high. But if you jump once, then wait for the player to start falling and try to jump again, you can see the second jump is much smaller.
Thanks all.