Non existing property on ArcRotateCamera (API doc vs implementation)

Hello!
The API lists the mapPanning property on ArcRotateCamera but it is not implemented. Actually I didn’t find mapPanning by searching the whole BabylonJS source code. :slight_smile:

Thank you!
R.

1 Like

Hmm, I did find this usage in arcRotateCamera.ts. It seems like when it’s set to false, the default, then double-click dragging vertically will pan up and down the screen, but when it’s set to true, I think it’s panning along the world z axis instead? :thinking: If you try in this playground for example, it makes a big difference if I comment out line 7 which sets mapPanning to true. :slightly_smiling_face: :beers:

// Eliminate y if mapPanning is enabled
if (this.mapPanning) {
    this._transformedDirection.y = 0;
}
1 Like

mapPanning is new in 5.0, you must have looked into the 4.2 source code?

1 Like

I was on 5.0.0-alpha.37. The mapPanning property was missing. However after updating to the most current alpha.56 I can see that property.
Thank you!

Yup the doc is always matching latest :slight_smile:

1 Like