I'm trying to come up with a system where there are several objects, only one of which can be selected at any time. I am able to switch between selected objects easily enough, but have not figured out how to deselect an object if the mouse is clicked anywhere on the screen that is not one of the objects.
Right now all I've found is the GetMouseButtonDown() function, but that returns on any click; I need to only do something if the mouse is clicked off of the currently selected object
So my question: Is there a way to determine if a mouse is clicked outside of an object?
Thanks for the help!
– anon16565548