Hi! I'm still learning Unity, and in my work, I intend to simulate some kind of sensor light.
The idea is to have an area or spot where the light is directed, and I want to register the ammout of time a passing object stays under the light.
Do you have any suggestions or ideas for the best way to pull it off?
Thanks in advance!
asked May 24 '12 at 12:49 PM
Model a rough cone (like 16 polys) that matches the light angle (I'm assuming this is a sweeping spotlight, not a stationary floodlight, or the solution would be trivial) with its origin at the point, make it a mesh collider trigger, parent to the light object, then check when the object enters the trigger and when it exits.
answered May 24 '12 at 01:00 PM