Sharing a material with a different mesh causes pointerdrag to not work

sharing a material with a different mesh causes pointerdrag to not work. You can drag any of the spheres, after a timeout of 4 seconds the line will also share the material and cause the drag to no longer work.

PG:

cc @amoebachant

Hi @riven04,
When you assign a material to a LinesMesh it sets the fillMode of the material to LineListDrawMode which allows the LinesMesh to render correctly (using lines instead of triangles), but that means the Sphere in your example that shares the material is now using the mode as well and is now harder to pick using the mouse (you have to hit a line). If you zoom in on the sphere after 4 seconds in your playground, you’ll see the effect of the fillMode change:

So you should use a different material if you want to apply it to both a LinesMesh and another mesh that you want to be able to pick with the mouse (which is what the PointerDragBehavior uses to know you’re trying to drag that mesh).

I hope that helps!