View Full Version : Birdseye view
05-19-2004, 01:20 PM
I would like to have a birdseye view of one of my objects, but when i set the position of the camera to +200 on the top of the y axis does this not give me a top down view, but more of an angled view. But yet +1000 will give me a top down view. All i would like is a view from just above the object, say 100 or 200 above the top most y.
Which view should i set it to, as i guess it is something to do with that too.
05-19-2004, 01:58 PM
Sounds like you are using lookat or something similar or you have supplied incomplete information. There are two aspect to the viewing matrix you require, the eye location and the viewing direction. Translate the eye to the desired position, add a bit to the Y axis and rotate around the x axis until the eye is pointing down (I think you may have to reverse the order of these operations).
05-20-2004, 01:58 AM
I dont completely understand, yes i am using gluLookAt.
This is what i do:
1: Set the pos of the camera to:
object.x , object.y + 1000 , object.z
2: Set the view to
object.x , object.y , object.z
3: Then set the up vector to 0,1,0
Thes are the steps i take but when i do this i just geta screen full of my background colour. But if i set the posisiton.x/z to 0 then i get a better birdseye view, but anything less than 1000 on the pos.y will give me an angled view.
Can someone help me please.
05-20-2004, 07:03 AM
It looks like you've discovered one of the problems with using a LookAt function: You need to change your up vector when it becomes parallel with the direction you're looking in.
Pick another axis for up, or prevent the axes from becoming parallel.
05-20-2004, 10:45 PM
i have tried the upvector to be either 1,0,0 and 0,0,1 but it makes the image apear at an angle, almost skewed, and not the top down view.
05-20-2004, 11:51 PM
Don't use lookat.
06-07-2004, 02:34 AM
Hey dont use lookAt at all.
This is very simple
Check for pilot view in Red Book.
That solves ur problem.
These type of problems should be sloved thru model-view matrix. with out gluLookAt
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.