My two questions are how to make LineSegment2 objects detectable by RayCaster and how to handle a large number of line segments in a scene.
I need to attach properties to the mesh such as the name and id; this requires me to create a new mesh/material/geometry for each line segment. I have to create about 50k line segments which make rendering slow.
I understand that I could use a single geometry, mesh, and material to draw the line segments but I would lose the name and id information that I need about each line segment. What techniques exist for handling a large number of objects in a scene?
When I click on the Line2Segment objects, Raycaster never detects an intersection. I have played with the RayCaster line precision property trying both large and small numbers but nothing works. How can I make this work?