Public Group

#### Archived

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

# OpenGL "camera" question

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

## Recommended Posts

I have a series of polygons being drawn between 0-128 on the x-axis, 0-255 on the y-axis (up-down), and 0-128 on the zaxis. My question is, how can I "look" at them in my opengl window. I want to get an aerial view of the whole terrain, on an angle so I can see the contour... how can I achieve this?

##### Share on other sites
Easiest way is to use gluLookAt. You choose a viewer/eye position, a point to look in the direction of and an ''up'' vector which represents which way you want up to be.

The look at point can simply be the center of your polys you want to see. Adding a constant x and y offset to this can produce your eye position (suitably large to get the correct height and angle). The up vector doesn''t need to be precise so you can just stick in something that gives the general direction like (0,1,0).

Experiment with the values and you''ll see how you can control the view like that.

1. 1
2. 2
3. 3
4. 4
frob
13
5. 5

• 16
• 13
• 20
• 12
• 19
• ### Forum Statistics

• Total Topics
632170
• Total Posts
3004547

×