realbasic-games
[Top] [All Lists]

Re: opengl camera troubles

To: REALbasic Games <REALbasic-Games at lists dot realsoftware dot com>
Subject: Re: opengl camera troubles
From: Thomas Cunningham <mauitom at maui dot net>
Date: Wed, 24 Mar 2004 16:20:22 -1000
>> Hello everyone, I'm back with more OpenGL problems.
>> I will explain the problem, and then give the code.
>> 
>> The Problem: I have a camera class, and if I move the camera back some so
>> I can see stuff, it doesn't behave as expected. With camera.z at -10,
>> "camera.yaw 0.5 "and "cube_in_the_middle.yaw 0.5" produce the exact same
>> result; the cube spins. With cube.yaw, the cube should spin. With
>> camera.yaw, the cube should seem to move back and forth, because the
>> camera is changing direction, correct?

<from OpenGL Game Programming>
In OpenGL, the default camera _always_ looks down the negative z-axis. Eye
coordinates remain the same no matter what transformations have been applied
to them. Eye coordinates come strictly from the Cartesian coordinate system
applied to the camera. When rotating an object, you are in effect rotating
the coordinate system of the _object_ with respect to the eye's coordinate
system.
</>

So it looks like some of your assumptions are a bit off.

Thomas C.
 


 - - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>