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
void Camera::RotateX(float angle)
{
m_xRotation += angle;
if(m_xRotation > 360.0f)
m_xRotation -= 360.0f;
if(m_xRotation < 0.0f)
m_xRotation += 360.0f;
m_lookPoint.y = glm::sin(glm::radians(m_xRotation));
m_lookPoint.z = glm::cos(glm::radians(m_xRotation));
m_lookVec = glm::normalize(m_lookPoint - m_eyePoint);
UpdateViewMatrix();
}
void Camera::UpdateViewMatrix()
{
m_rightVec = glm::normalize(glm::cross(vec3(0.0f,1.0f,0.0f),m_lookVec));
m_upVec = glm::normalize(glm::cross(m_rightVec,m_lookVec));
viewMatrix = glm::lookAt(m_eyePoint,m_lookPoint,vec3(0.0f,1.0f,0.0f));
}
It's obviously something REALLY simple i'm overlooking, any input is appreciated, thanks!
Edited by Lil_Lloyd, 15 July 2012 - 08:13 PM.






