How can I get `zoomToMouseLocation` to work with orthographic camera?

This is a followup from Ortho camera crashes with `camera.zoomToMouseLocation = true` - the code no longer crashes, but the zoomToMouseLocation does nothing when using an orthographic camera.

Is there a way this can be enabled, or can someone point me in the right direction how to implement this manually?

Cheers,
Zak

We d be happy to take a PR for it but basically this will require to adapt the camera top, left, … properties to provide both a zoom like effect and re targeting ones.

1 Like

FYI
I found a solution in this thread: Zoom where move cursor is in orthographic mode - #25 by Evgeni_Popov
And here is the working playground: https://playground.babylonjs.com/#EBPQH9#28

1 Like