[Lite] createArcRotateCamera, getPosition() is missing

Hello, based on

getPosition() is missing?

Babylon Lite is built on pure data + functions - cameras are plain state objects, and behavior lives in standalone, tree-shakable functions. To get a camera’s view matrix, you use the standalone getViewMatrix(camera) function.

The getPosition() function is shown on the Lite docs he shared, but the function is not exported. Also, the position would be different than the view matrix?

I didn’t tell that position is the view matrix.
As shown in the first PG,

const viewMatrix = getViewMatrix(camera);
const cameraWorldMatrix = mat4Invert(viewMatrix);

const position = {
    x: cameraWorldMatrix![12],
    y: cameraWorldMatrix![13],
    z: cameraWorldMatrix![14],
};

But, as I see, now there is even simpler way. Cameras expose worldMatrix, including any parent transform, and their position is read from its final translation column.

const worldMatrix = camera.worldMatrix;

const position = {
    x: worldMatrix[12],
    y: worldMatrix[13],
    z: worldMatrix[14],
};

console.log(position);

The result is the same in both examples.

There is getCameraPosition(camera) function exported that does the worldMatrix you mention. But still the docs mention a getPosition() function exposed, my guess is this should be replaced by getCameraPosition()

cc @georgie

docs fixed here ! docs(camera): document standalone position helper by georginahalpern · Pull Request #491 · BabylonJS/Babylon-Lite