As I couln’t find a topic that goes directly in that direction I am creating a new topic.
I use the ArcRotateCamera to rotate around an object. I found this useful function to lock the panning to one or multiple axis.
If you set the panningAxis to Vector3(1, 0, 1) the camera target shifts around on the ground plane which I would expect. You could say it pans around the world X/Z axis. But when you look at the scene from the top it limits the panning to the local X axis of the camera. Seems like some kind of gimbal lock to me.
https://www.babylonjs-playground.com/#R5146Q
If you set the panningAxis to Vector3(0, 1, 0) it just shifts on the camera Y axis and not on the world Y axis.
https://www.babylonjs-playground.com/#R5146Q#1
The behavior I want to achieve is something like this:
https://www.babylonjs-playground.com/#R5146Q#2
I attached a pointerDragBehavior to a box which is the parent of the camera. Of course it reacts to the wrong mouse button and only when you drag the box itself but it moves the camera on the world Y axis. The controls are not usable for a project as the camera is dragged with the cube (I can’t explain it well. You will see if you try it).
Any idea on how to achieve the camera movement on the world Y axis in a more practical way? Ideally with something like the panningDistanceLimit of the ArcRotateCamera.