http://www.youtube.com/watch?v=O14rp2hRaeE
(sound is terrible, you'll need to turn up your speakers)
I've been working on this project for the last few months. Trying to make a 3d Space simulator that uses realistic physics (drifting through space) instead of WWII style space sims like Xwing or Wing Commander.
Right now I'm a little bogged down with missile guidance.
Currently the game only supports the player's ship and floating asteroid targets.
One problem that I have is I cannot figure out how to easily change a ship's vector. All movement is handled by generating a 3d vector (x,y,z) and then every frame update each object's position by moving it that many meters. My current work around is to move an invisible object to the same location and facing as the player. Then I move the invisible object forward or to the side the amount of change I want to make in the player's vector. Then I add the difference between the invisible object and the player to the players vector.
Here is some pseudo code:
// To accelerate the ship 2 meters per second
//VectorX Y and Z are floats that hold the player's speed
dbSetObjectPosition( invisOb, dbObjectPositionX(player), ... Y & Z);
dbRotateObject( invisOb, dbObjectAngleX(player), ... Y & Z);
dbMoveObject( invisOb, 2);
VectorX = VectorX + dbObjectPositionX(invisOB) - dbObjectPositionX(player);
VectorX = VectorY + dbObjectPositionY(invisOB) - dbObjectPositionY(player);
VectorX = VectorZ + dbObjectPositionZ(invisOB) - dbObjectPositionZ(player);
// this last line updates the position of the player for the next frame
dbSetObjectPosition( player, VectorX+dbObjectPositionX(player), ... Y & Z);
If anyone could think of a faster way to do this or a more efficient missile guidance script I'll gladly give you a credit if my game ever gets finished.
--Using:
Sparky's collision
EZ rotate (love this one)[img]null[/img]
no Sig