Drag and drop. Determine which mesh has been dragged

Hi there. In this playground, you can drag/drop each individual model

https://www.babylonjs-playground.com/#9UFEBE#104

But… I find nowhere where I could determine in code which model is actually being dragged. More specificly I would like to determine in the endDrag which mesh was dragged and display it for example in the console. I searched the event object (which contains a lot) but didn’t really find the name of the object being dragged.

Anyone have a suggestion?

Kind regards,
Bart

The mesh being dragged is referenced inside pointerDragBehavior.attachedNode

4 Likes