Setting up a camera?

Started by
6 comments, last by DarkKiller 21 years, 10 months ago
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]
DarkMcNugget next time... ;)
Advertisement
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
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.
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
DarkMcNugget next time... ;)
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.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
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
DarkMcNugget next time... ;)
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.
_______________________________________Pixelante Game Studios - Fowl Language
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
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement