PDA

View Full Version : Zooming in and out



Louis Wychkraft
03-07-2004, 04:09 AM
i try to zoom my object by pressing the pg up and down key... so whenever i need to zoom i will alter the z coord by doing a translation. however, when i zoomed in too much part of the object got cut off and if zoomed further, it disappeared! is it because i have to change my viewport too?

mikael_aronsson
03-07-2004, 05:17 AM
Hi !

That is not a very good way to do it, it isn't even "zoom", don't move the "camera", change the field of view parameter when you call glPerspective, if you set the fov higher you will zoom out and if you set fov lower you will zoom in.

Mikael