I guess there could be several solutions but the first I would try would be to make a line trace from your mouse cursor and from the hit result get the object.
I guess there could be several solutions but the first I would try would be to make a line trace from your mouse cursor and from the hit result get the object.