• Create Account

### #ActualNorman Barrows

Posted 23 June 2013 - 09:13 AM

looked challenging at first, but its not that bad.

the midpoint between your 2 points is where to draw the billboard.

its coordinates are just the average of the coordinates of the two points p1 and p2:

mid.x=(p1.x+p2.x)/2;

mid.y=(p1.y+p2.y)/2;

mid.z=(p1.z+p2.z)/2;

then you need a billboard quad.

if is just something simple like a 10x10 quad, no problem.

if the distance from p1 to p2 defines the width of the billboard, its a bit more work.

so the next question is: what size quad do you want to draw?

once you have a quad mesh and a point to draw at, aiming it at the camera is trivial, billboard xr = cam xr + 180, billboard yr = - cam yr, as i recall.

so, what size quad do you need?

its not too hard to create / scale a quad based on the distance between p1 and p2 if that's what you need.

### #1Norman Barrows

Posted 23 June 2013 - 09:11 AM

looked challenging at first, but its not that bad. the midpoint between your 2 points is where to draw the billboard. its coordinates are just the average of the coordinates of the two points p1 and p2: mid.x=(p1.x+p2.x)/2; mid.y=(p1.y+p2.y)/2; mid.z=(p1.z+p2.z)/2; then you need a billboard quad. if is just something simple like a 10x10 quad, no problem. if the distance from p1 to p2 defines the width of the billboard, its a bit more work. so the next question is: what size quad do you want to draw? once you have a quad mesh and a point to draw at, aiming it at the camera is trivial, billboard xr = cam xr + 180, billboard yr = - cam yr, as i recall. so, what size quad do you need? its not too hard to create / scale a quad based on the distance between p1 and p2 if thats what you need.

PARTNERS