www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: ProNoob on March 11, 2011, 08:50:27 pm

Title: Rotate camera around some point.
Post by: ProNoob on March 11, 2011, 08:50:27 pm
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?
Title: Re: Rotate camera around some point.
Post by: EgonOlsen on March 11, 2011, 10:53:13 pm
Maybe a look at this thread helps: http://www.jpct.net/forum2/index.php/topic,977.0.html (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.