How to set zooming based on the position of cursor in mouse-wheel?

This is now in the latest version of Babylonjs, see for an example.

Updated Babylon to version 5.0.0-alpha.15.
But the method “zoomToMouseLocation” doesn’t work. :sleepy:

You’ll need to use “latest” version:

Thank! Happened!
But what if the objects are not located at the center of the coordinate system?
The camera begins to behave inappropriately.

can you provide a playground example of the problem you describe?

box.position = new BABYLON.Vector3(-10, -50, 0);
sphere.position = new BABYLON.Vector3(0, -40, 0);
plane.position.z = 10;
plane.position.y = -50;
cylinder.position.z = -10;
cylinder.position.y = -50;
cylinder.position.y = -50;
torus.position.x = 10;
torus.position.y = -50;
knot.position.y = -60;

Imagine that we have moved all the elements below.
I want the camera to be at the bottom now too. And everything worked the same way as in the center of the coordinate system.

Try this version: