Fix billboards Z rotation to worldframe

Hi,

I am playing with the billboards again now the opacity problem is gone (since 1.30). I am using them to display simple clouds and they now look lovely. However, they rotate along with the camera roll, which makes sense for Cesium but does not look too good when it comes to clouds viewed from a plane.

My question is then, is there a cheap way to fix their up direction to the world up direction. Stated otherwise: I would like the billboard to keep facing the camera but not rotate around their Z axis (vector going from the billboard to the camera)

Thanks,

Xavier.

Hello Xavier,

You should be able to use the Billboard alignedAxis property. Setting billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z; will make the billboard always point towards the north pole of the globe.

See the documentation for more examples: http://cesiumjs.org/Cesium/Build/Documentation/Billboard.html#alignedAxis

Best,

Hannah

Hi Hanna,

Thank you for your reply. I tried the UNIT_Z alignedAxis already but it gives a result I have some trouble to understand.

What I would need is something that could keep the billboard’s Z axis pointed at the camera and the Y axis always up. (sometimes known as “pointAt” method in some frameworks). But Billboards may not be the right fit for what I am trying to do.

Cheers,

Xavier.