

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I'm working on a game engine, and I want to be able to draw a billboarded (i.e. rectangular to the screen) quad with the center-bottom of the quad being determined by a single point.

share|improve this question
No reason you can't create a tag yourself... – Drew Hall Sep 3 '10 at 6:24
I don't have the requisite Reputation to do so – Sukasa Sep 4 '10 at 3:54
up vote 1 down vote accepted

In OpenGL, there is the concept of transformation matrices. These govern the positioning of the objects on the screen. From them, it is possible to read vectors (directions) that point "up" and "right". These are commonly called up-vector and right-vector (and the third may be called look-vector). How to get them is described here.

Once you have them, making a billboarded quad is very simple.

P - right * .5 + up
+-------------+ P + right * .5 + up
|             |
|             |
|             |
|      P      |
+------+------+ P + right * .5
P - right * .5

These are the coordinates (P is the governing position, at the bottom center of your BB). You can draw such quad the same way as any other quad.

share|improve this answer

Your Answer


