rdLODtools Tutorial 8 – Fixing Billboard LODs that won’t rotate to camera

If you ever get the problem where your Billboard LODs don’t rotate to face the camera, it could be because it is not perpendicular to the ground plane. If you’re adding meshes or instances that are “aligned to normal” this can quite often be the case.

The reason they stop rotating is because of a bit of code in one of the material functions (MF_CalcAngleOffsetPos2 found in rdLODtools/MaterialFunctions). This code is there to avoid this:

This just returns a WorldPositionOffset of 0,0,0 unless the ObjectOrientation is perpendicular to the landscape plane.

Note: You will want to make the Billboard Material “Double Sided” to fix any visibility issues, by default for optimization reasons it’s single sided.

I recently encountered a problem after migrating some trees with Billboard LODs from one 5.1 project to another 5.1 project, the rotation stopped completely – for some reason it was always failing the test and returning 0,0,0.

Also, you may have objects that are always very close to perpendicular and would display ok with the rotation. Just hook up the rotation value directly, skip the “If”:

This fix was suggested by FAXCORP on the Unreal Forums.