🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problems with a Walk-Through. HELP NEEDED !!!

Started by
-1 comments, last by GameDev.net 24 years, 6 months ago
I want to realize a Walk-Through in my 3D
scene and so I tried out the following thing:

void RenderLoop(void)
{
glLoadIdentity();

//... do some stuff

glTranslatef(1.0f,0.0f,depth);
glRotatef(left_angle,0.0f,1.0f,0.0f);
glRotatef(right_angle,0.0f,1.0f,0.0f);

//... render scene
//...update depth, left_angle, right_angle
}

But I can not walk to the left or right when
I look in these directions...It seems that I
can only rotate around one point in the scene
intstead of changing the viewing-point
continuously...
Maybe I have to change the glTranslate
parameters each render cycle?...
I don't want to work with glLookAt(...)
or gluPerspective(...) or so because there
has to be another solution...
Do I need a kind of buffer in which I save
the current viewing point? Plese help me !!!
I'm working on a so hopeful application...
It would be bad if I gave up now...

P.S. Sorry about that (bad) English.
My mother-language is german.

Thanks in advance !!!!!!!!!!!!!!!!!!!!!!!!!

This topic is closed to new replies.

Advertisement