Rotate camera around some point.

Started by ProNoob, March 11, 2011, 08:50:27 PM

Previous topic - Next topic

ProNoob

So, I wanted just to rotate camera around some certain point. (using mouse drag)
I don't know how can I accomplish that as I don't know muych about matrixes etc. I'm not good at math yet.

I do not want to rotate camera around itseft, but around some point. I just want to view one 3d model from diffent angles.

Could anyone post some example code with some explanation?
- profesional noob.

EgonOlsen

Maybe a look at this thread helps: http://www.jpct.net/forum2/index.php/topic,977.0.html

It contains a simple example for rotating the camera around an object based on mouse drag. The idea is, to move the camera to the rotation pivot, do the rotation and move it back.