Jump to content
  • Advertisement

Archived

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

SiN

flipping the y axis around?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!