Jump to content
  • Advertisement
Sign in to follow this  
Andrew1979

glRotatef problem

This topic is 3629 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 All I'm wanting to rotate a quad around the Y-axis which I have got it to do, but it rotates the wrong side of the quad. Is there anyway I can get it to rotate the other side of my quad? Thank you in advance. Andrew

Share this post


Link to post
Share on other sites
Advertisement
What do you mean it rotates the wrong side? I need a bit more info on what is wrong or you want the rotation to do.

Share this post


Link to post
Share on other sites
Well the quad I have rotating rotates from the left side of the quad. It seems to do this with all the quads i've created by default. What I'm wanting to know is how would I rotate a quad from the right hand side? :)

Share this post


Link to post
Share on other sites
uhmmm...mathematically speaking, a sign is what you use to distinguish between positive and negative values, e.g. +100 and -100, where + and - are signs.

Rotations can be either clockwise or counterclockwise (which I assume is what you mean by saying that your quad rotates from the left or from the right side).

So if you are using glRotate, try using a negative value for the rotation amount instead of a positive value to make your quad rotate in the opposite direction

Share this post


Link to post
Share on other sites
Ah I get you now, yes I'll try that, thank you.

so basically,

instead of glRotatef(angleValue, 0.0f, 1.0f, 0.0f)

it would be:

glRotatef(-angleValue, 0.0f, 1.0f, 0.0f)

Andrew

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!