Gravity is a vital portion of 3D video games and simulations, as the environment cannot mimic real physics without gravity. Without gravity, characters and objects will not be able to properly move, jump, or fall, because gravity is an essential piece of many motion equations. In most situations, a complete Physics Engine is optimal, as it factors in gravity along with other components – collision detection, rotation calculations, rigid body dynamics, Brownian motion, et cetera), however it is not required. Algorithms for gravity have been written and open sourced for many languages and can be easily found on services like GitHub, Google Code, and SourceForge.

The Force of Gravity equals 9.8 m/s2, so if a character starts falling from rest, his speed will increase according to the time elapsed squared times the force of gravity. The speed can then be used to calculate how much damage must be applied to the character, so falling for one second doesn’t hurt the player as much as falling for 4 seconds, which adds an additional dynamic to gameplay.

%d bloggers like this: