• Advertisement
Sign in to follow this  

Bilboarding?

This topic is 4920 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've seen many a time the explination of: Grab the Up and Right vector from the camera... draw the sqaure using those. But that looks wrong to say the least. When you are standing still, and look around the bilboard tilts with the looking. So, how can you generate a bilboard that is always in the plane purpendicular to the line from the camera center to the object center, and having nothing to do with the direction the camera is facing?

Share this post


Link to post
Share on other sites
Advertisement
Hmm.. something like:

facingVector = cameraPos - billboardPos;
upVector = (0, 1, 0); // global up
rightVector = facingVector.cross(upVector);

// up and right give billboard edges.
// Generates 'cylindrical' billboards, all using global up (good for trees)

// For spherical (totally facing camera):
upVector = rightVector.cross(facingVector); // and overwrite old up.


That should (hopefully) do the trick. [grin]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement