I am trying to bring my object closer like this. This function gets executed on every press of key
void bringCloser(){
printf("Closer
");
glMatrixMode(GL_MODELVIEW);
glTranslated(1000-myMove.closer , 1000-myMove.closer ,1000-myMove.closer);
}
And that works just as it should…Now i want on different press of the key to bring this same object further like this…
void bringFurther(){
printf("Further
");
glMatrixMode(GL_MODELVIEW);
glTranslated(1000+myMove.further , 1000+myMove.further , 1000+myMove.further);
}
But instead of moving object further this bringFurther function does exactly same thing as bringCloser. It keeps bringing object closer and closer.
I obviosly did something silly here so can anyone point me in some direction how to accomplish this please