orbit camera
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
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.
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.
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.
thanks
Silvia
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.
thanks
Silvia
There's an orbiting camera tutorial on this site:
http://gametutorials.com/
--
Dave Mikesell Software & Consulting
[edited by - dmikesell on October 22, 2003 7:53:58 AM]
http://gametutorials.com/
--
Dave Mikesell Software & Consulting
[edited by - dmikesell on October 22, 2003 7:53:58 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement