|
-
Oct 2nd, 2003, 11:39 AM
#4
Addicted Member
Simpiler yet
Gravity is just a vertical force, every time you move the object (a ship, right?) just subtract a constant (const GRAVITY = 9) from the Y position of the object.
And if its also thrusting during that iteration, add whatever constant thrust should be, 10 or more if you want it to beat gravity and 9 if it shouldn't move, vertically, and less than 9 if you want it to fall slower. (play with all those numbers to see what works best for your game)
That was entirly too long winded for the simplicity of this answer.
Just because it doesn't follow the phsyics of this world doesn't mean it does work just as well.
NOMAD
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|