Rotate camera with mouse? [closed]
- by ezio160324
Once again, using tutorial 10 at NeHe.
I want the code
if (keys[VK_RIGHT]) // Is The Right Arrow Being Pressed?
{
yrot -= 1.5f; // Rotate The Scene To The Left
}
if (keys[VK_LEFT]) // Is The Left Arrow Being Pressed?
{
yrot += 1.5f; // Rotate The Scene To The Right
}
and
if (keys[VK_PRIOR])
{
lookupdown -= 1.0f;
}
if (keys[VK_NEXT])
{
lookupdown += 1.0f;
}
to be done with the mouse instead of left/right arrow and Page Up/ Page Down. I tried everything I could think of. Can anyone help?
EDIT: I tried using WM_MOUSEMOVE message. I just could not figure it out.
EDIT2: I am using pure OpenGL to do this. No window management system or other libs such as GLUT, GLFW, SDL, SFML etc. Just OpenGL. OpenGL and GLEW.
EDIT: Issue has been solved.