pointerDragBehavior ghost movement on click. Bug?

Hi evreybody,

I was trying to use a pointerDragBehavior to drag an object on click and to drop on the second one and i think i found an issue :
when you drag a first object and drop it, the second one you will click will move on the position of the last dropped object, but, if you move the mouse the draged object will move back on the cursor.

The PG to illustrate :

There is a “solution” line 48 but i’m not sure that is really correct.

Maybe i did something wrong.

Did someone have an idea ?

cc @Cedric

I’m taking a look.

1 Like

PR Fix uninitialized last ray for PointerDragBehavior by CedricGuillemet · Pull Request #12410 · BabylonJS/Babylon.js · GitHub

2 Likes

I cheked my PG above and I thought to see that the bug was solved.

thanks for reactivity.