I'm having the orientation of rb3dspace camera follow the mouse using the
camera.yaw and camera.pitch commands. The tracking is based on the
distance of the mouse from the screen center. So for example, if the
mouse is in the upper part of the rb3d space, the camera will rotate up,
so that it looks straight up, then keep going to look backwards, then
straight down, then back to start, and so on.
It seems to work fine, except that I want to limit the amount of pitch,
so that the camera never looks backwards, ie I want to stop pitch
rotation if the camera is already looking straight up or down. But I
can't figure out how to convert the quaternion representing camera
orientation into something that I can interpret as straight up or down.
Is there anyway to convert quaternions into angles?
Rob
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|