Archived

This topic is now archived and is closed to further replies.

flipping the y axis around?

This topic is 5301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

hi, i''d like to kno how i could flip the y-axis around in perspective view. so, i''d like going upwards to decrease the y-value, while going downwards to increase the y-value. and i''d rather not have a quick work-around like just make all the y values in glVertex3f() negative, because i like my code REAAL clean thanx in advance for the help SiN

Share on other sites
i think somehwere u have code that looks something like this

glcamera(cam.x,cam.y,cam.z,cat.x,cat.y,cat.z, 0,1,0);

make it like this

glcamera(cam.x,cam.y,cam.z,cat.x,cat.y,cat.z, 0,-1,0);

edit : actualy, whats wrong with tossin a negative in front of every y coord, i think rotating the camera may reverse some other things too.

[edited by - honayboyz on August 15, 2003 1:33:11 AM]

Share on other sites
thanx, but i dont use glCamera (i have a feeling u mean gluLookAt) ... i just use glTransform and glRotate , and render everything relative to the cameras position

any other sugestions? thanx

SiN

Share on other sites
Why do you want to invert the y-axis?

Share on other sites
Would a
glScalef(0.0, -1.0, 0.0);

work? I''m sure I have seen this used when using a stencil buffer to do reflections. The idea being that an axis is inverted and the model/object can be drawn again, but will appear flipped?

Share on other sites
That would be

glScalef(1.0f, -1.0f, 1.0f);

Remember that rotations will go the other way around as well!

Sander Maréchal

GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!