ArcRotateCamera.mapPanning does not take upVector into account

Hello again,
as i continue to play with ArcRotateCamera i think i found another bug. Could you guys please confirm or deny this is the case?

There is an option to define a custom upVector on ArcRotateCamera to override the default Y axis (we use Z in our app) and there is also an option to define mapPanning flag which eliminates the transform on Y axis - this seems hardcoded here: https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Cameras/arcRotateCamera.ts#L946

→ however the two flags are not in sync with each other - shouldnt the mapPanning flag eliminate transform on the axis that we defined using the upVector instead of the hardcoded Y? At least thats what i would intuitively expect if i configure them both.

Thank you and have a nice day.

2 Likes

cc @PolygonalSun

Any news on this by any chance? :slight_smile:

Hey @jmheretik,

IIRC, the original intent behind the mapPanning flag was just to remove Y-axis movement with panning so it isn’t a bug per se. I could potentially see it working off of the upVector instead but I’d want to double-check with the team that there isn’t any issue with this.

Hey, I just wanted to let you know that I didn’t leave you hanging. I have a draft PR live now: ArcRotateCamera: Modify mapPanning to account for upVector by PolygonalSun · Pull Request #14352 · BabylonJS/Babylon.js (github.com). If the team signs off on it, it should be a simple PR to review and merge.

if someone wants panning on the Y axis, mapPanning should be false and camera.panningAxis.y should be used? afaik… but maybe i misunderstood the issue.

PR is merged

Thank you! Cant wait to try it in our app :slight_smile: