I’m trying to change the center of rotation of an ArcRotateCamera without actually changing the perspective. I think it’s somehow possible with the solution provided by @Gijs over here More precise panning control
I tried it with a combination of lockedTarget
and targetScreenOffset
and it is working (after a couple of hours fiddling around) — the problem is, that targetScreenOffset actually changes the perspective, I’d need a way of shifting the camera without actually changing the perspective. Anyone has a pointer?
To illustrate my point a bit, I created a small screencast:
The camera stays in place (mostly) and is rotating around the lower right corner where I clicked. However as with the click there’s a shift in perspective (note how the reflection changes).
I came up with another, much simpler idea. Just put another camera under the ArcRotateCamera, shift it a bit and use this camera to display the scene. I made a quick test and it seems to work fine: https://www.babylonjs-playground.com/#12WBC#477 (only thing missing is the dynamic calculation of the shift)