Skip to main content
GameDev.net gamedev.net
🔒 Locked

OpenGL perspective question

Started by JeroMiya Aug 28, 2001 at 6:10 PM 2 replies 400+ views
Original Post
JeroMiya
JeroMiya
I''ve got a question about perspective in OpenGL. I have a scene where there''s an object close to the viewer that (s)he can move around the screen on the xy plane and then press fire to make it move along the z axis towards a target farther away on the z axis. The problem is, no matter where the user moves the object on the screen, it ends up going to a small space in the middle of the screen. How can I widen this perspective a little so that things don''t go towards the horizen as fast?
Mort
Mort
To select the perspective ratio you select the projection matrix and call gluPerspective(angle, ratio, ZNear, ZFar). Change the angle parameter to change the perspective ratio (The ratio parameter changes ratio between X and Y).
Mort
linus78
linus78
The parameters Znear and Zfar is that the "Z field" which will be drawn on the screen?
Qoy
Qoy
The Znear and Zfar params are the z coordinates of the near and far clipping planes, respectively. Anything in front of the near or behind the far will not be rendered.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.