Space Prisoner 1.4

Space Prisoner 1.4
Work on Space Prisoner has ceased.
However, I will continue to update the high score list as scores come in.

Thursday, May 08, 2008

Finally got the movement and shot-firing directional vectors working properly.
The ship's orientation is represented by two angles, which I call "tilt" and "swivel". Extracting a cartesian vector from these 3D spherical coordinates (i.e. a radius and two angles) is as follows:
x = cos(swivel) * sin(tilt)
y = sin(swivel) * sin(tilt)
z = cos(tilt)
Then, the radius r is simply the magnitude of the vector; that is, how fast the object is going.

No comments: