Configure mouse drag direction

Hi,

Is there a way to configure the drag direction so that when I drag left the mesh move to the left, etc.

Right now when I drag left the camera move down and when I move right the camera move up etc.
I want the camera so when I move left the mesh move left etc. like in this PG: https://playground.babylonjs.com/#EBPQH9#100

But I need to keep the rotation of the camera and the position also.

PG with issue:https://playground.babylonjs.com/#EBPQH9#105

NOTE: I know that I got this behavior because my camera is rotate from 90 degree on the X axis but I really need this configuration because I need the axis in this configuration.

Thank you!

cc @Cedric

I’d simply do it with pointer observable and changing the transform node position:

Orthographic zoom demo | Babylon.js Playground (babylonjs.com)

2 Likes

Perfect thank you very much!

Have a great day!

2 Likes