I have a user's position in my game. I have a 3dof controller which moves my user in a 3d space.
I have 2 vectors cameraPosition and where to lookAt. Now for a simple case I have setup the position as follows:
cameraPos=godObjPos; lookAt=godObjPos; cameraPos.x=godObjPos.x + 2; lookAt.x=godObjPos.x - 2;
How should I change the x and y cordinates of both cameraPos and lookAt to simulate the user turning his head towards left or right?
I set up the keyboard keys a and s to change the angle: a when pressed reduces the angle and s when pressed increases the angle.