[Lite] Configurable camera up vector

In contrast to Babylon.js, Babylon Lite’s camera up vector appears to be hard-coded to world +Y.

I need to look in the Y direction, so I need to provide an up vector orthogonal to that direction (for example +Z). With a fixed +Y up vector, the look direction and up vector are parallel and the camera orientation is undefined.

Could Lite expose a configurable upVector for FreeCamera/ArcRotateCamera, or an equivalent public custom-view-matrix API?

This is all the philosophy of Lite :slight_smile:
in a nutshell we do not expose an API if the user can do it easily.

For a Z-up camera, you can parent the camera to a rotated TransformNode . Camera transforms and controls operate in the parent’s local frame, so the camera can remain in its regular Y-up configuration:

const s = Math.SQRT1_2;
// Rotate local +Y to world +Z.
const cameraRig = createTransformNode(
    "cameraRig",
    0, 0, 0,
    s, 0, 0, s
);

// Local -Z becomes world +Y through the parent rotation.
const camera = createFreeCamera(
    { x: 0, y: 0, z: 0 },
    { x: 0, y: 0, z: -1 }
);
camera.parent = cameraRig;

This produces a camera looking toward world +Y with world +Z as its up direction, without requiring a custom view matrix. The same approach works with an ArcRotateCamera : its orbit remains Y-up in local space, while the parent maps that axis to the desired world-space up direction.

There is currently no public API for directly supplying a custom view matrix, but for a fixed or dynamically configurable world-up frame, the parent rig is the intended workaround.

Thank you. I continued my journey with your fix, unfortunately I just ran into the next one: [Lite] Screenshot / Grab framebuffer

Checking :slight_smile: