I want to get primitive’s orientation and transform to Heading, Pitch, Roll.
const tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(933228),
}),
);
// What I need to do next
3D tilesets in particular have a modelMatrix property which describes the transformation. A bit verbose, but you can turn this into HeadingPitchRoll like so:
To clarify: do you want to get the orientation of the models within the tileset? I’m afraid you can’t access individual models through the public API, but you can find the transform of the tile that contains the geometry.
For example, if the root tile of the tileset has geometry, you can fetch it via tileset.root and get its transform. If the geometry is located in its children instead, you can access them via tile.children. Hope that helps!