#Detect mouse over Line Renderer
1 messages · Page 1 of 1 (latest)
I don't think linerenderer exposes anything to help with that but you can always iterate over the line and find the closest distance to all of the segments
yeah, that wont work. Basically, I have a bunch of line renderers on the scene and I need to select one thats closest to my mouse
why it wouldn't?
cuz I would have to do that for all lines and all segments
I think you could also add a mesh collider to your LineRenderer and bake the LR to it - then I think you should be able to do OnMouseOver events
Edit: Or a EdgeCollider2D or PolygonCollider2D and set the points of it to your LR points
Are there many? (about how many segments in total?)