Billboards are objects that are always facing the camera.
This is useful for floating text, folliage and some optimisations.
Concept for amethyst:
Billboard component that tags an entity as a billboard.
BillboardSystem:
Gets the main camera and all (transform,billboard) and sets the billboard transform to face the main camera.
The problem with this is that we have no way (I think?) to set the rotation to ignore Parents.
Optional feature:
The component can optionally target an Entity that is not the camera.
Equivalent unity code:
void Update () {
transform.LookAt(transform.position+Camera.main.transform.rotation * Vector3.forward,Camera.main.transform.rotation * Vector3.up);
}
Psst, this may be of assistance here.
This should be implemented in a vertex shader. Rotating 4 vertices on the GPU is a lot more efficient than rotating the whole billboard object in the scene tree. Especially when considering that this is supposed to aid the foliage system. But then again, this would probably prevent it from being a good beginner issue :sweat_smile:
Closing this due to age and lack of progress. If there is demand, we'll put it on the roadmap.
Most helpful comment
This should be implemented in a vertex shader. Rotating 4 vertices on the GPU is a lot more efficient than rotating the whole billboard object in the scene tree. Especially when considering that this is supposed to aid the foliage system. But then again, this would probably prevent it from being a good beginner issue :sweat_smile: