PDA

View Full Version : Move Camera



10-25-2003, 07:22 PM
Hi buddies,

On hand, I got some problem:
A camera is defined as gluLookAt(0.0,0.0,-z,0.0,0.0,0.0,0.0,1.0,0.0) and there is a view point which is located as (3.0,3.0,3.0). How to move the camera position to that view point after I pressed the ESC button ?

Cheers,
Mandy

147-2
10-31-2003, 10:53 AM
hmm.... maybe set a boolean value...

bool eschit;

then in your keyboard code...

if(key == ESCAPE)
{
eschit = true;
}


and finally in your camera update code...

if(eschit)
{
gluLookAt( camera in one location );
}
else
{
gluLookAt( camera in original location );
}