[SOLVED] Angle of rotation allow angles > 359?
Posted: Mon Feb 21, 2005 1:52 am
I've been working on a Knights of the Old Republic style 3rd person camera (rotation around the character on Y axis only) and I'm curious if a particular condition is allowed by Irrlicht. Here's the code snippet I'm concerned with:
while(device->run()) {
...
core::vector3df cam_rotation = camera->getRotation();
cam_rotation.Y += .009;
...
}//End while.
This is how I set the speed of rotation, and this will happen any time the left or right arrow keys are held down in my game. However, if I were to hold the left (or right) arrow key down for an extended period of time, would the angle of rotation on the Y axis be allowed to exceed 359 (and hence possible run-time error) or would Irrlicht bring it back to 0 and continue on? Or is there some other type of catch-all that would save me in this scenario? I can code in the limit of 360, I was just curious if it's already done somehow.
while(device->run()) {
...
core::vector3df cam_rotation = camera->getRotation();
cam_rotation.Y += .009;
...
}//End while.
This is how I set the speed of rotation, and this will happen any time the left or right arrow keys are held down in my game. However, if I were to hold the left (or right) arrow key down for an extended period of time, would the angle of rotation on the Y axis be allowed to exceed 359 (and hence possible run-time error) or would Irrlicht bring it back to 0 and continue on? Or is there some other type of catch-all that would save me in this scenario? I can code in the limit of 360, I was just curious if it's already done somehow.