What I need:
While dragging the mesh, if the mesh intersects with a tube, the mesh should snap on the tube… and then continue dragging along the tube.
My idea was to calculate the ray for each tube (from start to end) and then associate the Ray on PointerDragBehavior.
What I have:
I started doing this here https://www.babylonjs-playground.com/#PFYKFU#1 but I have no idea how to force the box to be dragged on the rays inside the
I though its possible to do with
startDrag PointerDragBehavior - Babylon.js Documentation
But it seems that I cant run that inside the Observable?
Is this the wrong strategy and is there a better way?