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.
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.
The behavior I want to achieve is something like this:
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.