rotationQuaternion different depending on camera type (UniviersalCamera vs. DeviceOrientationCamera vs. WebVRCamera)

I’m trying to sync up two cameras on two different devices. The goal is to read the rotation quaternion from camera A on computer A, send it to computer B via webRTC, and then rotate camera B so it’s facing the same direction. Camera B (the receiving camera) is always a standard UniversalCamera.

When camera A (the sending camera) is also a UniversalCamera, this works great.

But when camera A is a DeviceOrientationCamera on my phone (per the WebVR experience helper), camera B does not match camera A’s angle.

Similarly, when camera A is a WebVR camera (HTC Vive), the angles also do not match.

To get camera A’s quaternion, I always use scene.activeCamera.rotationQuaternion, regardless of the type of camera. (Perhaps that’s my mistake?)

To set camera B’s angle (always a UniversalCamera), I use scene.activeCamera.rotationQuaternion = {QUAT from camera A}

Am I missing something obvious? It would be great to be able to sync cameras this way for an educational app I’m developing.

As always, much thanks for your help!

Not sure I can help other than giving your question a bump. Perhaps other parameters for the two cameras do not match. It might be worth checking.
UniversalCamera - Babylon.js Documentation
DeviceOrientationCamera - Babylon.js Documentation

This is because DeviceorientationCamera or WebVRCamera have initial rotations that are added to the rotationQuaternion property.

As always, thanks for your quick response! I really appreciate it. All the best.