Scene and camera transformMatrix desynchronised

I have a project built on a scene with 2 cameras. Both are attached to the scene.
Both have been pushed into scene.activeCameras.
Both are present; respectively with index 0 and 1, in scene.cameras[ ].
One of them is supposed to be the scene.actiiveCamera.
I am mainly interested in camera0 (say scene.cameras[0]), which is of type ArcRotate.

At some point I need the transformMatrix to get the screen coordinates of some elements. Apparently in a default implementation the essential transformMatric is updated, up to my knowledge, “automatically” to follow the user’s inputs.

I am wondering when or why it is (or it would be) needed to make calls directly to scene.updateTransformMatrix().

In my case I am ending up in a situation where (still with the same active camera) to I am getting 3 matrices as follows, assuming a symbol declaration:

mat1 = scene.getTransformMatrix();
mat2 = camera._transformMatrix;

The issue in my case is that they are all 3 different (no 2 of them are equal…)
By the way the value of mat1 stays constant when the elevation or azimuth of camera0 is changed! How does it come? Thank you very much for any help!

Hey Jean-Marie!

the view and projection matrices will be automatically updated when the camera is used to render the frame.

If the camera is not part of the activeCameras or not the activeCamera then you will have to do it manually

Merci, Many thanks, Infatigable, unflagging, Deltakosh!!. I think I understand the point and still wondering how I can make a call to scene.updateTransfromMatrix and not see any change to the current transform matrix (from te current active camera) despite the fact the actual screen reflects the changes (apologies for this too long sentence to be in good English…)
The best for me is to complete a demonstrating PG.

Yes if you can repro with a simple case we could dig deeper :wink: