Mouse move event has no hit mesh

When on POINTERDOWN event , i can get the hit mesh, then keep down and move the mouse, get the BABYLON.PointerEventTypes.POINTERMOVE event but in the event there is no hit mesh.

I am a new 3d programer, and I want to make a magic cube, so i need to drag the box with myself.

Help~

Welcome @Tidus :slight_smile:

I am having a hard time understanding your use case and the issue :frowning: Maybe you could create a small playground highlighting your problem and in no time I am sure you ll get help from the community.

HI @sebavan,
i think he was referring to the fact that, when we catch a POINTERMOVE event, there isn’t a similar property like pickedMesh as for example in POINTERPICK event (the info about picked mesh are correctly null because there is no picked mesh). I’m facing the same: how can i get info about the mesh my pointer is over? PIckInfo.hit is abviously false, and i didn’t see other infos about the mesh over which i’m moving the pointer.

You could use babylonjs Actions: Actions | Babylon.js Documentation

with OnPointerOverTrigger and OnPointerOutTrigger

1 Like

Thank you very much, this is the solution.

1 Like