"too much recursion" error since v8.10.1

I would say if the invalid value on the position includes a NaN anywhere, this behaviour is expected because NaN compared to NaN will always return false.

The camera.onViewMatrixChangedObservable also has this warning about this:

Some methods like Camera.getViewMatrix and Camera.getWorldMatrix can trigger the onViewMatrixChangedObservable observable, so using them inside an observer will require additional logic to avoid a stack overflow error.

(from the docs here: Camera | Babylon.js Documentation)

If you can repro this with a position that is valid please share and we can investigate further.

3 Likes