Hi,
In my game i have fences that can be repaired. When a fence is destroyed, the user is able to hover over it with his cursor and then a transparant green version of the fence should appear indicating that you are selecting it for repairs.
N ow the issue is that im shooting a raycast from my player controller via “hit results under cursor by channel”. The hit detection works fine as intended. But i’m struggling to find a way to detect if the raycast is no longer hitting the object so that the green fence can disappear again. Right now the green fence appears and stays visible forever. I want it to disappear as soon as the mouse is no longer hovering over it. But for the love of God i have tried every possible method i could think, down to rediculous stacks of nodes to make it work, but i can’t seem to get around it.
Does anyone have any suggestion what so ever on how to achieve this? It’s one of the main features of my game, so i can’t just drop it sadly.