Original Post
int CD3D9Camera::RotateY(float p_fAngle)
{
float x = m_Right.m_fX;
m_Right.m_fX = cos(p_fAngle) * m_Right.m_fX - sin(p_fAngle) * m_Right.m_fZ;
m_Right.m_fZ = cos(p_fAngle) * m_Right.m_fZ + sin(p_fAngle) * x;
x = m_Forward.m_fX;
m_Forward.m_fX = cos(p_fAngle) * m_Forward.m_fX - sin(p_fAngle) * m_Forward.m_fZ;
m_Forward.m_fZ = cos(p_fAngle) * m_Forward.m_fZ + sin(p_fAngle) * x;
ResetViewMatrix();
return 0;
}I want this method to rotate the right and forward vectors around the Y axis by an angle. I have been trying for a few evenings to get this working but all I end up with is camera movement that swings back and forth if I continuously rotate by the same angle. I understand the basic mathematics behind what I am doing, in so far as a rotation matrix is required and that is multiplied by the vector and these are the vector values that are changing when rotating around the Y axis. If anyone can point me in the right direction or can offer a hand that would be great. I've been studying lots of articles but I'm failing to see where I am going wrong.