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?
does anyone know if this will ever be implemented?
Unfortunately, the way open source work, only a sage with a crystal ball would know an answer to this question. It’s up for grabs, the original author may implement this, someone else may implement it, it may have to wait for you to implement it, or it may never get implemented. All are viable options.
The one good thing is, lines2 are just an example, that can be modified, it’s not embedded in the core.
Unfortunately, the OP did not implemented the project’s feedback so far. Anyway, you can still try to use the respective code if you need the feature urgently.