View Full Version : Figuring 3D Viewable Space
nstod
03-20-2002, 10:57 AM
In a program I am writing at the moment, i am trying to figure the actual viewable space that the camera is looking at. To better explain this, I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on. Can anyone help me?
nexusone
03-20-2002, 11:26 AM
Well your viewing area is relative to how you have setup the camara view.
You will find examples of what you are looking for at http://nehe.gamedev.net
Originally posted by nstod:
In a program I am writing at the moment, i am trying to figure the actual viewable space that the camera is looking at. To better explain this, I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on. Can anyone help me?
Furrage
03-21-2002, 07:13 AM
Originally posted by nstod:
I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on.
Have a look at gluUnproject. You can do a search in this forum as this has been discussed many times.
chxfryer
03-21-2002, 03:01 PM
if you are wondering the viewing frustum... on http://www.gametutorials.com has tutorial on frustum culling.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.