How to use alignedAxis for a billboard

Hello

I trying to use alignedAxis to control orientation for a billboard image in CZM. Unfortunately impossible to understand how it works
Let say rather than having my billboard facing to the viewer, I would like to have it facing to the up direction
It is someting to be done like this?

“alignedAxis”: { “cartesian”: [1, 0, 0] }

when doing like this, I can see not real differences with the default orientation for billboard. Perhaps just the billboard marker having rotated around its Z axes but always facing the viewer

Hope you will be able to help

thanks

Have you seen the code examples for alignedAxis the Cesium API? alignedAxis is defined in world WGS84 coordinates.

     // Have the billboard up vector point north

billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;

// Have the billboard point east

billboard.alignedAxis = Cartesian3.UNIT_Z;

billboard.rotation = -Cesium.Math.PI_OVER_TWO;

     // Reset the aligned axis

billboard.alignedAxis = Cesium.Cartesian3.ZERO;

Patrick

HI PAtrick

Will have a look

Since I need to do this in a CZML file will trying to make it working

I want for an aircraft marker, having the billboard parallel to the earth surface at the lat/lon positon for my aircraft

I am using something like this but always align to the viewer!!! The viewer is probably not living in the WSG84 world :slight_smile:

billboard.alignedAxis.cartesian.Add(Math.Cos(myAC.lon * Math.PI / 180.0));

billboard.alignedAxis.cartesian.Add(Math.Sin(myAC.lon * Math.PI / 180.0));

billboard.alignedAxis.cartesian.Add(Math.Sin(myAC.lat * Math.PI / 180.0));

Ah, perhaps you want a rectangle primitive with an image material.

Patrick