PDA

View Full Version : How to put a camera inside an object?



elithin
06-03-2011, 05:39 PM
Hi guys!
My problem is exactly that. I have to make a flight simulator, so i load an airplane model (.OBJ) and i have to put a camera inside it. it has to look as if i'm the pilot, you know.
but i don't know how i cando this whithout moving the entire scene.
can someone help?

thanks in advance

dorbie
06-05-2011, 07:10 AM
There is no distinction between moving the eye and moving the entire scene from a graphics hardware perspective. Just a conceptual difference for the application developer.

You can position the aircraft relative to the eye and render it then position the rest of the scene relative to the eye and render it.

elithin
06-05-2011, 11:34 AM
hmn. ok, so id have to something like
push matrix then translate the aircraft to something really near the eye, draw the aircraft, pop matrix, translate the scene to something "far" from the eye, and draw the scene?
just asking because i'm really new to opengl and graphics computing.
and thanks for replaying =]