LWJGL Forum
Programming => General Java Game Development => Topic started by: dangerdoc on April 05, 2012, 01:14:26
-
How do you zoom the camera in?
-
Are you talking about 3D or 2D? Could you provide us with a little more information? ???
-
I am sorry, I forgot that there is even a 2-D when I posted.... I meant 3-d. I just want to zoom a 3-d camera in. Thanks, and sorry for not giving more info.
-
Highly dependent on your rendering system.
How do you manage the camera?
-
There are multiple ways you could do this. You could actually move the camera forward to "look" like it's zooming in. However, I assume you want a more realistic way. I think you could accomplish this by changing your frustrum to be smaller on the far-z axis (i.e. shaped more like a 2D frustrum). That would counter-act the usual further-objects-get-smaller effect to make it zoom in.
-
Hello,
Thank you for replying, I have learned a lot on this forum thanks to the friendly replies! Now, I don't know about frustrum, but I found this (http://www.lighthouse3d.com/tutorials/view-frustum-culling/) on google. So, your saying to change the farplane so that it is basically thicker? I do not know much about frustrum. If I was right about changing the farplane in my understanding, then how do you change the z-axis? In reply to codebunny, I don't quite know yet, but I think that I will be using this (http://www.lloydgoodall.com/tutorials/first-person-camera-control-with-lwjgl/). Thanks for your replies!
-
Now, I don't know about frustrum, but I found this (http://www.lighthouse3d.com/tutorials/view-frustum-culling/) on google. So, your saying to change the farplane so that it is basically thicker? I do not know much about frustrum. If I was right about changing the farplane in my understanding, then how do you change the z-axis?
Sorry, I meant change the further away frustrum plane (i.e. the far plane in the image) so that it is smaller. If you are using GLU.gluPerspective(), I think you can just change the fovy (field of view) parameter to make it smaller.
-
Thank you for your help. I have learned what I wanted, and will be experimenting on it!!! I went to google, found which parameters for glu.gluperspective were which and that fixed it for me!!! Thank you also codebunny!
-
Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
-
Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
It is :)
-
Does GLU.gluPerspective work with GL11 rendering? In my game I am using GL11 for the camera and the rendering. If it is not compatible, what is the GL11 way to zoom in 3-d?
It is :)
Thanks!!! :)