Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


orbit camera

This topic is 5481 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys I think rotating the whole world around a point in the space is the same as orbiting the eye around the same point, my question is: can I physically orbit the eye while keeping the world stationary? how can we do that ? thanks Silvia

Share this post

Link to post
Share on other sites
The standard way of doing cameras is to use three vectors: View, Position, and up. When the camera is to be rotated, the position - view gives you the vector from the origin, and you rotate at that point, and then translate back out.

There is more than one way of rotating the point.

Euler Angles - Suck. I can never get my camera to work properly when it is facing down any axis at either 90 or 360 degrees. I can''t seem to find a way to fix it either, without making the camera entirley screwy at said points. I don''t recommend this method. Even if your camera works, it''ll be jerky and annoying.

Axis-Angles - Work great, easy to understand and derive. I use this approach normally.

Quaternions - A little more difficult to understand, but still not all that hard to implement. I recommend being fairly proficient in linear algebra before delving into quaternions, as this will make the subject more palettable.

Cylindrical Coordinates - People mistakenly call this method polar or spherical when they''re in 3d (don''t use spherical, because it is a pain in the ass to calculate z-coordinate with trig functions). It worked ok, exept that the atan function would return 0 sometimes, and I would get a divide by 0, so my camera acted identical to the euler angle camera at 90 and 360 degrees. I don''t recommend this method either.

If you want, I can give you some resources related to any of these three methods. I wrote a paper that was a recently a featured article explaining the construction of a simple first-person quaternion camera that is a good place to start.

Share this post

Link to post
Share on other sites
Thanks for the fast reply
I have no problem with quaternions and I have the required math
I have done an orbitting effect but the whole world is orbitting around the pivot point and the camera is stationary, I need the world to be fixed in the middle of the screen while the camera is orbiting around the pivot, may be what is happening with me is the right thing but I dout it
I would appreciate it if u send me the resources u r talking about.



Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!