i'm making a game, and just went to implement collision detection when i found that it would be incredibly difficult because of a shortcut i added to work around a problem. now i'm going back to fix that problem, but i'm running out of ideas.
i'm trying to do this... (in c++)
CODE
xPos = (whatever); //the x and z coordinates of the object.
zPos = (whatever);
rotation = (whatever); //the rotation of the object in degrees.
glPushMatrix();
glTranslatef(xPos, 0, yPos);
glRotatef(rotation);
renderObject();
glPopMatrix();
and draw an object at xPos,0,yPos with a rotation of 'rotation'.
instead, the object appears at xPos, 0, -yPos. the problem can be fixed by putting doing this for the translation:
CODE
glTranslatef(xPos, 0, yPos);
and until now this is what i was doing, but it makes things like collision detection and camera work much more complicated later on.does anyone have any ideas on why this would be occuring and/or how to fix it?
thanks, muchly appreciated.

