Author Topic: Rotate camera around some point.  (Read 2974 times)

Offline ProNoob

  • byte
  • *
  • Posts: 2
  • I like pancakes
    • View Profile
Rotate camera around some point.
« 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?
- profesional noob.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12002
    • View Profile
    • http://www.jpct.net
Re: Rotate camera around some point.
« Reply #1 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

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.