PDA

View Full Version : translation instead rotation



Maxmagnus
07-10-2002, 03:59 AM
I have an problem considering
a simple replacemant of an rotation
with translation.
The rotation worked very vell
but the rotation seems to be dead ?!
since I can't find any logical exponations it
might be that I am overlooking something.
The general kode is from red book so it is ok.
Here is portion that I changed:

glPushMatrix();
glTranslatef((GLfloat) move,0,0);
glutSolidCube (1.0);
glPopMatrix();
*******************************************
void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case 's': /* s key translira objekat */
move = move + .5 ;
glutPostRedisplay();
break;
Thank U in advance
maxmagnus

Gavin
07-10-2002, 04:52 AM
You mean the translation is dead? Do a check to see that you move variable is being updated, i.e. use a printf or something

Maxmagnus
07-10-2002, 10:22 AM
Thanks for
answer it was the begining
of solution.
Now problem is gone.
Maxmagnus