[Proscene] rotate camera around scene center according to 2D mouse position
in
Contributed Library Questions
•
4 months ago
Hi all :) (sorry for my english)
Currently playing with proscene, I would like to rotate my camera around a point (lets say scene center 0,0,0) according to the 2D mouse coordinates and while
my mouse is moving..
What I'm trying to achieve is this: depending of the mouseX, camera will rotate between [-90°, 90°] around scene's Y axis.
Same for mouseY, the camera have to rotate around the X axis of the scene..
For those who know Proscene it's by default the same effect when you drag your mouse.. the camera automatically rotates around the scene center. But I don't know how to do this only while my mouse is moving.
As I forgot all my maths, I tried to implement several snippets from different language, and took a look to proscene classes source, but it seems that I'm a bit lost after all.. :( Any help would be much appreciated!
Thanks! :)
1