Look around and move camera [OPENGL]
in
Programming Questions
•
2 years ago
Alright, I'm trying to build a first person game. Got most of it done, but am having trouble with the camera (I only need it to look around, not up and down): I've got the lookaround part, doing the direction in polar co-ordinates then converting from that to cartesian coordinates and setting the look-to distance to somwhere in the region of 30000. Now, the problem I have is how I can make this be the direction for the player to move in. So, what I need is a way to look around, then move the player in the direction they are facing. The early camera I have at the moment can look around, but only moves up and down the axes, as the movement just consists of "if 'w' pressed, playerXpos++".
Any help appreciated!
1