Camera Question
Posted: Thu Aug 17, 2006 2:18 pm
Yes, again... I've spent the last few hours looking trough the 50 or so pages of the search result without finding any hint.
I want to implement a camera who does the following:
1. Rotates around a specified node.
2. Zooms with the mouse wheel.
3. Pans left,right,up and down when the cursor is within an user defined space.
1. I can do that with addCameraSceneNodeMaya. Works well.
2. Derived class from above.
3. I wrote that myself. Works well.
Now, I can do only one of the above at any time, i.e. I can pan up and down easily, but after I do that, the Maya camera starts behaving strangely. It doesn't move around some point in 3D space (a node, for instance), but around the mouse cursor. What i do get is a weird 2D spatial motion. As if moved the viewport around.
I understand the math behind a complex camera, in fact, i wrote such one in pure C and OPENGL, a few years back (I uploaded a quick video on youtube http://www.youtube.com/watch?v=6UzWlMsugXo just to get the idea...).
Any quick tips? Other than rewriting everything from scratch again....
I want to implement a camera who does the following:
1. Rotates around a specified node.
2. Zooms with the mouse wheel.
3. Pans left,right,up and down when the cursor is within an user defined space.
1. I can do that with addCameraSceneNodeMaya. Works well.
2. Derived class from above.
3. I wrote that myself. Works well.
Now, I can do only one of the above at any time, i.e. I can pan up and down easily, but after I do that, the Maya camera starts behaving strangely. It doesn't move around some point in 3D space (a node, for instance), but around the mouse cursor. What i do get is a weird 2D spatial motion. As if moved the viewport around.
I understand the math behind a complex camera, in fact, i wrote such one in pure C and OPENGL, a few years back (I uploaded a quick video on youtube http://www.youtube.com/watch?v=6UzWlMsugXo just to get the idea...).
Any quick tips? Other than rewriting everything from scratch again....