Jumping and falling
How Cube Island moves the player with two numbers, gravity and a jump speed, why a block world hops up steps by itself, and how to make it feel like the moon.
Two numbers
Every frame, gravity pulls the player's upward speed down by GRAVITY, 24 blocks a second each second. A jump sets the upward speed to JUMP_V, 8.2. The height of a jump comes from those two: about 1.4 blocks, just enough to get up one block.
That is no accident: in a block world a jump must reach exactly one block up, or stairs and towers stop working.
Godot 3D Intermediate is a course for paid accounts. The rest of this lesson, and its guided session, are in the app.
Next lessonA goal and a clock