Public Group

#### Archived

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.

## 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 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 on other sites
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

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 11
• 16
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009849
• ### Who's Online (See full list)

There are no registered users currently online

×