rotating primitive

Started by
7 comments, last by Brother Bob 12 years, 2 months ago
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.
Advertisement
Yes, glTranslate.
I have worked with glTranslate but cant seem to get the coordinate origin to shift to the left.
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?
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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

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]
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.
well I am trying to move the origin of the coordinate axis to the left so I can rotate a space ship primitive.
So, again, what is wrong with glTranslate?

This topic is closed to new replies.

Advertisement