Hello,
Is there a function or a simple way to notify a Gameobject that it isn't in range of the Proximity Detector anymore?
The big task I want to archive is a way to know whether there is an object near my hand so that I can deactivate all other objects. And if the object isn't in range of my Hand anymore, I want to activate all other Objects again.
So I am looking for the counterpart of OnProximity(Gameobject).
Right now I am programming a workaround as following:
The OnProximity(Gameobject) function has a period so that the function gets called every 0.1 Seconds. Everytime that happens it calls a function in my Gameobjects that resets a timer to 0. The Gameobject counts it up to 0.2 seconds.
As long as the timer is < 0.2 I know that the Hand is still in range of the object.
I don't really like my approach because my experience taught me that timer are a hardcode solution. So is there a better way?
Inb4: I can't use colliders because I am using the Interaction Engine Brush Hands and with them colliders do not work as intended. That's why I try to use the Proximity Detector.