Drag Behaviour Validation

is it the correct behaviour of pointerDragBehaviour to send out events with invalid points?

The sphere should not be able to move leftwards and get a negative x or z value. This works. But the observables still show negative values, when you check the console log for the onDragEndObservable

Workaround would be, to use the position of the mesh that is using the pointer behaviour.

cc @Cedric

Let me take a look …

From the doc:
dragPlanePoint in world space where the drag intersects the drag plane

So, it’s where the mouse/touch pointer has been released. It’s not the delta applied to the mesh position. Best is to do the delta of the mesh position when drag ends on the user side.

1 Like

Hope this PR is ok: