Uncaught TypeError: t.toRotationMatrix is not a function (Setting camera Quat)

The error is triggered on

scene.activeCamera.rotationQuaternion *= pendingDeviceQuat;

Being scene already defined and pendingDeviceQuat a valid quaternion.

Fully reproducible sample here (thanks for the playground!) https://www.babylonjs-playground.com/#UF6PT9#15

Thank you in advance.

Unfortunately, javascript is not C++ and you can’t override the operators. You will need to use scene.activeCamera.rotationQuaternion.multiply or scene.activeCamera.rotationQuaternion.multiplyToRef to perform the multiply.

Thank you the weird part is that I multiplied other Quats in the same code without problems!