Simple Spaceship Physics
The code contained in this source file demonstrates how you can move an object around the screen using thrust, velocity, and friction. The movement of the object is similar to the movement of the spaceship in the classic Asteroids game.This demo uses the LEFT and RIGHT arrow keys to rotate the object, and the UP arrow key to move the object (use thrusters). The object is also kept on-screen at all times.
Popular items by Nutrox