View Full Version : How can I find the distance from the center of -space- (using GLUT)

11-11-2004, 07:40 AM
Heya all, jus got into Opengl (GLUT) for a Uni assignment. We hav to make a game to move the player round space, and hav asteroids in it and everything :)

Well the prob is that I've got a cockpit ready to use with it, but I wanna put the distance of where the player is, from 'the center of space' (where x=0, y=0 and z=0). So how do I get the players co-ordinates? (I'm using GLUT)


Hylke Donker
11-12-2004, 09:22 AM
You can find out that, by checking how much you have translated your matrix.