Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

rotating primitive

This topic is 2342 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

I am trying to rotate a space ship primitive.is there a way to move the origin of the coordinate axis to left of the center of the screen.

Share this post


Link to post
Share on other sites
Advertisement
Can you post some code? (not all of it!). It's possible you're doing the translate at the wrong place. i.e. are you rotating and then translating, or translating and then rotating?

Share this post


Link to post
Share on other sites
I think you need to re-ask your question. Rotating a ship for any 3rd person space shooter, you should leave your model at the origin, do your rotations, and then translate it into space.

Share this post


Link to post
Share on other sites
here is the code I am working on.
[font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"]void[/font][/font][/font][font="Consolas"][size="2"][font="Consolas"][size="2"][color="#000000"] AlienLeft()[/font][/font]
[font="Consolas"][size="2"][font="Consolas"][size="2"]{[/font][/font]
[font="Consolas"][size="2"][font="Consolas"][size="2"]glRotatef(k,0.0f,0.0f,1.0f);[/font][/font]
[font="Consolas"][size="2"][font="Consolas"][size="2"]k+=0.01f;[/font][/font]
[font="Consolas"][size="2"][font="Consolas"][size="2"]}[/font][/font]

Share this post


Link to post
Share on other sites
So what is your problem with it? What is it you're trying to do, and how is is not working? What is the problem with the answers given already? You really need to provide some information if you want some help.

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!