Camera return wrong upVector

Hello everyone!

I get the camera’s upVector by camera.upVector, and it is Vector3(0, 1, 0) by default. But when I read the source code in targetCamera.ts, I find that the function _rotateUpVectorWithCameraRotationMatrix() will return the _cameraRotationMatrix.m[4],_cameraRotationMatrix.m[5],_cameraRotationMatrix.m[6] as the target upVector, which is not equal with original upvector. Here is the PG. This playground will alert

I don’t know where is wrong. Thanks first.

You can set to camera.updateUpVectorFromRotation to true if you want the up vector to reflect the camera’s rotation.

Also, you should call getViewMatrix if you want to update the internal state of the camera instead of _updateCameraRotationMatrix, as this method is not intended to be called directly (it is protected):