Adding "mapPanning" accessor to ArcRotateCamera

I was wandering if it possible that we add a mapPanning accessor to ArcRotateCamera.
When it is on, the camera will eliminate the transform on y axis, while false will display the same with now.
It is hard to do this thing, I can only listen to the mouse event by myself like this(from How to realize Panning on the X,Z-Plane with the ArcRotateCamera?) or rewrite the _checkLimits function(maybe any other better solution?).
And it was once exist on 4.2.0(though it was thought a bug). For people who update from 4.2.0 to 5.0.0, it is not a good experience in my opinion.
If needed, I’m really willing to do it.

Please feel free to create a PR for it ?

Already made one.

But I failed to pass the documentation check. Would you mind pointing me out where is wrong? Or maybe I should just ignore it?

You need on the property to add the /** … */ documentation for JSDoc as we do on every other public properties.

Also, you added back the version which was not working before depending on the orientation. like if are totally aligned with the Y axis. Did you try it locally ?

@PolygonalSun should have more feedback on this one.

I’ve tried locally and that’s exactly what I want. It will have the same behavior with that on 4.2.0 when setting panningAxis.y = 0 on 4.2.0, which seems really normal in most games.

Perfect let s wait on @PolygonalSun to double check and in the meantime you can reopen the PR with the comment to be ready to e merged on Monday

Thank you so much for solving my problems!

Hey, when I went to look at this this morning it was shown as already merged via Add arcrotatecamera mappanning by Hypnosss · Pull Request #11243 · BabylonJS/Babylon.js ( Code looked fine to me though

1 Like