I have been stuck on this issue for a long time and would really like to get my head around it, I hope someone can help…
I have a sphere and would like it to spin left and right when dragged left and right with the mouse, and up and down when dragged up and down with the mouse.
I have it all working except:
In the initial position, I can use ofRotateX(); to give the impression of the sphere rolling up/down.
BUT - If I spin the sphere left by 90 degrees (i.e ofRotateY(90) Now I can no longer use ofRotateX to spin the sphere up/down since the axis has shifted.
There must be a clever bit of maths that I can’t find. I understand vectors and understand the problem, just can’t seem to solve it. easyCam works just like I want, except I find it very limiting and so I’m trying to achieve a similar effect myself.
Thanks in advance,