BillBoard Mode
Billboard is a special mode for meshes that ensures the mesh is always facing the camera. This is commonly used to display information to the user, such as sprites or particles.
Example :
box.billboardMode = 7;Billboard Mode Values:
| value | Type |
|---|---|
| 0 | BILLBOARDMODE_NONE |
| 1 | BILLBOARDMODE_X |
| 2 | BILLBOARDMODE_Y |
| 4 | BILLBOARDMODE_Z |
| 7 | BILLBOARDMODE_ALL |
Things get a bit more complex when your billboard object has a parent, because you may or may not want to integrate the parent's rotation into the mix.
If you set nothing but the billboardMode, the mesh will ignore its parent rotation:
Simple Example of Mesh Billboard Mode with a parentYou can decide to force all billboards to take the parent rotation into account without interfering with the billboard orientation by setting BABYLON.TransformNode.BillboardUseParentOrientation = true;: