How to Prevent Billboard From Tilting

I would like an object that rotates to face the camera but does not tilt. I’m using a billboard to place an image of a flag at different locations. I want the flag to rotate to face the camera, but I don’t want the flag to tilt to face the camera. I’d like the flag to always remain perpendicular to the earth’s surface.

I’ve experimented with the alignedAxis property, but I haven’t found a solution with this approach.

Is there a way to prevent billboards from tilting (or locking them so that they are always perpendicular to the earth’s surface)?

Or is there another object I should use for this that will rotate to face the camera?

Am I missing something obvious? Any help would be appreciated.

Does Cesium staff monitor these topics any more?

Apologies for the late response @Rob. It looks like the feature you’re looking for for billboards does not exist currently and is highly requested: Add heading option for a billboard · Issue #6165 · CesiumGS/cesium · GitHub.

The alternative solution would be to use a rectangle or polygon entity and apply the image as a material. Each time the camera moves, you can detect it using moveEnd (Camera - Cesium Documentation) event and adjust the heading of the entity so that it faces the camera. Here is a code sample:

// get the camera's heading and add 180 degrees so that the final heading is facing the camera
var  heading = + CesiumMath.PI_OVER_TWO; 
var pitch = 0;
var hpr = new HeadingPitchRoll(heading, pitch, 0);
var orientation = Transforms.headingPitchRollQuaternion(
       position, // current position of entity
entity.orientation = hpr;