Archived

This topic is now archived and is closed to further replies.

Setting up a camera?

This topic is 5672 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, how can i set up a camera? I think about making a little remake of quake1 and I think rotating the whole world is a little bit frustrating. So, how can I set up a camera the easyest way? Thx! dark [edited by - DarkKiller on June 4, 2002 5:17:13 PM]

Share this post


Link to post
Share on other sites
Hi..

The easiest way?? Hmm.. that depends on how much functionality you want to add to your camera..

Try checking this site out.. I''ve made my whole CCamera class after reading that tutorial: http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg1.htm#Camera

This site has several tutorials on camera implementing...

Hope it helps..

Halloko

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The easiest way (in my opinion) is to keep track of the position of your camera and its rotation about all three axes, and then rotate the camera and then translate it. If you were to translate and then rotate, you would end up spinning the object around but not making it look like the camera had turned. Rotating then translating the camera (and then drawing your world) makes it appear that you are walking around.

Share this post


Link to post
Share on other sites
ok, thx!

I''ll check the site out in a minute!

to the second advice: I don''t know much (anything) about cameras so I cannot say something to that....
I''m new to OpenGL an C++ but I did much with an engine for VB and DX8. So the whole topic is not new for me but I have to learn more about C and O-GL.

I will come beck when I read the tut about cameras!

Bye
dark

Share this post


Link to post
Share on other sites
quote:
Original post by DarkKiller
Hi there,

how can i set up a camera?

I think about making a little remake of quake1 and I think rotating the whole world is a little bit frustrating.
So, how can I set up a camera the easyest way?

Thx!

dark

[edited by - DarkKiller on June 4, 2002 5:17:13 PM]


Rotating the whole world around the camera is the default way of doing stuff in computer graphics.

Share this post


Link to post
Share on other sites
I didn''t know that....

I can''t believe that rotating the whole world is faster than using ''lookat''. With lookat I can position my cam and can ''look at a point''. Imagen I program a virtual sphere around my cams position and I can look at every point at the sphere moving the mouse, like in every 3d-shooter....

ok, have to think about rotating the whole world....

I still have to learn the basics! Maybe you can help me understanding this stuff better.

thx
dark

Share this post


Link to post
Share on other sites
Using LookAt is rotating the world around the camera.
There is no alternative to that. We''re dealing with a fixed moniter, we can''t move through an enviroment.

All gluLookAt does is allow you to emulate movement easier. You''re still rotating/translating the world.

------------
aud.vze.com - The Audacious Engine <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.

Share this post


Link to post
Share on other sites
as you want to know where your world is from your cams point of view, you have to get the world relative to your cams point of view, means transforming it so that the cam is at 0,0,0 facing straight forward. else you can''t see it from the cams point of view. no chance (except you would raytrace, but thats another topic not related to gl or dx at all (yet))

"take a look around" - limp bizkit
www.google.com

Share this post


Link to post
Share on other sites