Getting Pan event back from arcRotateCamera

When ever the arc rotate camera pans, I’d like to get a callback or event. I’m not sure how to do it.


Checking the API docs, I don’t see a native callback (ArcRotateCamera - Babylon.js Documentation)

Have you considered writing your own input for the panning and adding a callback there? This doc describes how to customize camera inputs.

Here is the original input script that handles arc camera panning.

You could pretty much copy this and then add your hook wherever panning happens (ie around line 166 and 198).

yup there is no special event for that, the closest would be onViewMatrixChangedObservable to detect any move change for the cam but probably easier to check the position and rotation delta each frame.