Orthographic Camera Mode Panning Issue

Hi there,

Apologies for the open-ended question, I’m still new to Babylon.js. I’m struggling to get an arc-camera in orthographic mode to pan correctly.

I’ve got panning to work, however, I get an offset that I’d like to eliminate. I’m trying to have the panning directly follow my mouse pointer. i.e. so the pointer is always in line with the model from where it started. However, if I zoom close into the model, I get a noticeable offset which can make controlling the pan difficult.

I’m using the below method, with the zoom on pointer functionality: https://playground.babylonjs.com/#EBPQH9#28

Can anyone point me in the right direction to remove the offset?

Thanks for any pointers :slight_smile: Wondered if it’s something to do with the panning sensibility but I can’t seem to get the desired result.

Pinging @cedric to see if he can help

Let me check that :slight_smile: Do you have a PG you can share @jcoop ?

I tweak the sample PG to eliminate the inertia and make precision more usable when zoomed:

https://playground.babylonjs.com/#EBPQH9#33

2 Likes

Thanks, @Cedric, that’s great! Much closer to what I’m looking for. Will try to implement and report back. Thank you for your help :slight_smile:

1 Like