Hello again!
I believe I found a bug so I came straight to the forum to ask about it
When I set zoomToMouseLocation to true on ArcRotateCamera (cool feature btw ) and also targetScreenOffset to something other than (0, 0) → it seems like its not accounted for during the zoom.
Attached is a playground demonstrating the bug: https://playground.babylonjs.com/#SRZRWV#1679 (try zooming while pointing at the left side of the plane) When you remove line 59 the zoom works as expected again.
It seems like the targetScreenOffset is simply not taken into account in the ArcRotateCameraMouseWheelInput?
@PolygonalSun there is one more issue with targetScreenOffset i’m running into:
The specular reflection seems to also not take it into account… but I have a feeling that this might be by design?
Sorry if this is a noob question but I cant find much about the targetScreenOffset in the documentation and that’s why I’m not sure if it should be taken into account everywhere or only in some situations.
I updated the playground to illustrate it: https://playground.babylonjs.com/#SRZRWV#1682, when you zoom in you can see that the specular reflection is towards the original camera position without the offset… remove line 59 for comparison.
It’s expected, it’s not the camera position in 3D space which is modified. The target offset is an offset in screen space, it’s as if everything was scrolled in the X/Y direction, but the specular highlight does not change place wrt the mesh.