#Detect mouse over Line Renderer

1 messages · Page 1 of 1 (latest)

bright rain
#

Hey, I was wondering if there is any way to detect if mouse is hovering over a line renderer?
If no then what would be the fastest way to get linerenderer closest to mouse position? It's all in 2D view

iron kestrel
bright rain
bright rain
#

cuz I would have to do that for all lines and all segments

random bluff
#

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

iron kestrel