Author Topic: Rotate camera around some point.  (Read 3204 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: 12110
    • View Profile
Re: Rotate camera around some point.
« Reply #1 on: March 11, 2011, 10:53:13 pm »
Maybe a look at this thread helps:,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.