Set camera rotation with Matrix3?

Is there a way to set the camera view to a specific rotation using a Matrix3?

Hi @Arjan14, the .setView method can input a HeadingPitchRoll, which can be constructed from a Matrix3 via a Quaternion. So overall it would look something like this (untested) code:

// Input myMatrix3
const quaternion = Cesium.Quaternion.fromRotationMatrix(myMatrix3);
const headingPitchRoll = Cesium.HeadingPitchRoll.fromQuaternion(quaternion);
camera.setView({ orientation: headingPitchRoll });

Personally, I prefer starting directly from a HeadingPitchRoll, since the values are easier to understand (see the HeadingPitchRoll Sandcastle). Are you getting a pre-constructed Matrix3 from another source?