Hi. So I have rolled out a mini camera class. For rotating the camera I thought along the lines of a unit circle, where the sin of an angle gives one dimension and the cos of an angle gives another, so if you went through all 360 degrees all the points on a unit circle would be plotted.
HOWEVER, I just get an oscillating motion for some reason....
the main example code is here
//rotate around the x axis, so the y and z values change over time t
m_eyePoint is the current camera 'position' and m_lookPoint is the point the camera is pointing at, so the lookVector is obtained by doing m_eyePoint - m_lookPoint.
m_eyePoint is the current camera 'position' and m_lookPoint is the point the camera is pointing at, so the lookVector is obtained by doing m_eyePoint - m_lookPoint.
I was asking about m_eyePoint and m_lookPoint because you don't actually use m_lookVec when you calculate viewMatrix.
EDIT: There is something else that may help in solving this problem: What is m_eyePoint set to at construction?
Hey thank you for your advice and suggestions, I managed to solve my problem. The look point was being changed as if it was following a unit circle so the values calculated had a min of -1 and a max of +1. Since my eyepoint had a z value of -8.5 the result of lookPoint - eyePoint for the look Vector was ALWAYS negative. I changed the code to the below, and it now works fine!