![]() |
|
|||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#8
|
|||
|
|||
|
I think I got it. I just check for the boolean status of the timer before I start a new one AND make sure, there are not already other targets in the sensor.
Code:
def enter_sensor(e):
print('{0} entered {1}.'.format(e.target.name,e.sensor.name))
numTargets = len(e.manager.getActiveTargets(sensor=e.sensor))
global bTimerActive
if not bTimerActive and numTargets == 1:
print('Starting timer.')
viz.starttimer(0,concurrencyTolerance)
bTimerActive = True
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delaying proximity reaction makes sensor unresponsive for the time of delay | jelly | Vizard | 4 | 11-23-2016 05:20 AM |
| sensor radius bug? | lalechuza | Vizard | 7 | 08-25-2015 06:57 AM |
| Orientation selective (Viewing Vector) Proximity Sensor | lmGehrke | Vizard | 2 | 03-17-2015 01:31 PM |
| Proximity Sensor Problem | kmkm | Vizard | 3 | 03-04-2014 12:54 PM |
| CompositeShape proximity sensor | mhtong | Vizard | 1 | 09-24-2012 12:18 PM |