Exiting LookAtTransform(Matrix4.IDENTITY) breaks ScreenSpaceCameraController strafing

hey y’all!

I’m using cesium in react (via resium), and am encountering strange behavior with lookAtTransform.

After the user clicks an entity, we have a setting to set the user to LookAt the location of the entity. This is to let the user inspect a certain entity. The user can then leave this mode, upon which we call lookAtTransform(Matrix4.IDENTITY)

However, after leaving, it seems that the movement speed of the ScreenSpaceCameraController is significantly faster. Drags that would otherwise result in 10-20 meter displacements are sending the camera kilometers away.

Under normal conditions (before lookAt and then lookAtTransform(Matrix4.IDENTITY), when you drag with ScreenSpaceCameraController, the mouse cursor stays in approximately the same are throughout the drag. However, after the lookAtTransform(Matrix4.IDENTITY), the mouse appears to be “sliding” in the the direction of camera movement (opposite the direction of the drag).

Intuitively, it feels like regular drags are “grabbing” a reference point and moving the camera away from it. Now, the “grabbed” point is moving about as fast as the camera is expected to move, and the camera feels like it’s movement is “adding” to the movement of the “grabbed” point.

We make no other modifications to the camera or anything while in lookAtTransform mode. We do not change the camera position (only transform it into the new LookAt reference frame), but otherwise, make no changes.

Any thoughts on what could cause this and what a potential fix could be?

Thanks!