๐ฎ Game Design
Gravity & Jumping โ Physics in Games
Real gravity accelerates things downward. In games, we simulate this by adding a velocity variable. Each frame, gravity increases the downward velocity. Pressing jump sets a negative (upward) velocity. When the player hits the ground, velocity resets.
3 min 10 XP Lesson 5 of 9

Real gravity accelerates things downward. In games, we simulate this by adding a velocity variable. Each frame, gravity increases the downward velocity. Pressing jump sets a negative (upward) velocity. When the player hits the ground, velocity resets.
Quick Quiz
Why is JUMP_FORCE negative?