Game Development Reference
In-Depth Information
Handling multiple gravity sources
Some games require handling gravity from multiple variable sources. In this recipe, we'll
handle this and create a simple miniature solar system to demonstrate it using Thruster-
Control from the Building a rocket engine recipe. To (greatly) simplify the relation
between the planets, they won't affect each other with their gravity, but only the ship. It will
also be made in a 2D-asteroids-like fashion, although the gravity would still apply for a 3D
game.
We'll add some basic controls to rotate the ship to the left and right, and you can use the
thruster to make the ship move forward.
Search WWH ::




Custom Search