How can I find the distance from the center of -space- (using GLUT)

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 :slight_smile:

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)

Thanks

You can find out that, by checking how much you have translated your matrix.