Question on detecting mouse cursor over player Unit

What would be the best way to detect if the player has a mouse cursor over one of the units that he controls? I want to display some UI when this happens and then turn it off when the mouse goes off the unit.

thoughts?

thanks

1 Like

You just run the exact same Raycast logic on every Update instead of just on mouse click. That way you are constantly testing if there’s a unit under the mouse and then you can use that info to showcase some overlay or anything you want.

3 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms