Hello Guest

Draw on a quad then rotate

  • 4 Replies
  • 7153 Views
Draw on a quad then rotate
« on: November 10, 2005, 17:47:20 »
I am working on a radar screen.  I want to draw dots or stars, or whatever, on a quad then rotate the quad based on my avatars rotation/heading.  Can you draw to a quad like this?  

I know my avatars heading and the x and z (only moving in x and z, no y height movement) of all targets and the avatar.  Is there a better/alteranate way to do this.  I want to display dots ina 100px by 100px box.
thanks!
S

*

Offline CaseyB

  • ***
  • 118
Draw on a quad then rotate
« Reply #1 on: November 10, 2005, 18:03:00 »
You would want to do a GL11.glPushMatrix(), then roates the scene to match your avatars heading and draw all of the blips in this rotation and then GL11.popMatrix() to get back to the old Modelview matrix.

Draw on a quad then rotate
« Reply #2 on: November 10, 2005, 18:07:32 »
I have my scene rotating.  In the bottom right corener I have a small box that has blips corresponding to the x and z of targets.  Everything works, but doesnt respond to my avatars rotation yet.  Are you saying roate before I do my blips in the little box?
S

*

Offline CaseyB

  • ***
  • 118
Draw on a quad then rotate
« Reply #3 on: November 10, 2005, 18:17:12 »
Yup

cool
« Reply #4 on: November 10, 2005, 18:19:21 »
ok.   Only problem is, i am using a FontWriter class to draw to the screen right now.  Can I draw on a quad or something and rotate it?  If I rotate just before my write calls (to draw *) they disappear from the scene.
S