Original Post
I'm trying to simulate the rotation of a camera in a sphere around any selected object of my screen or the (0,0,0). My input consists of movement units towards Y axis and towards X axis(as usual). I've tried using Matrices, the Spherical coordinates, or even two independent cyclical movements. The result I keep getting is: i)Correct rotation around Y axis(mouse movement towards X) ii)As soon as the mouse pointer passes 90 (or -90) degrees the model performs a rotation aroun its axis(Y axis relevant to its initial position) and reverses. I'm sure I'm missing something in rotation theory but I'm really stuck. Why is this happening and what can I do to bypass this and achieve my goal? Thank you. [Edited by - pontifikas on December 26, 2009 12:48:17 AM]