hi all…
so i have near sensor in my game tied to a small python script.
i have it setup so script always is getting list of objects it is hitting using hitObjectList method. I am looking for object with specific property, as marked by near sensor. i am trying to get a list of all local coins in area of player, but when I run game I get follow effect:
no error in console
list prints as blank
when I change near sensor to search for any objects near it by leaving property box blank, it returns one object is in list. The object is far away, and has the same physics settings as all other objects. My distance and reset distance for sensor is very far… 200 BU and 205 BU. what could be going wrong?
Code I am using:
near = cont.sensors['near']
List = near_sensor.hitObjectList
print(str(obList)) #for debug
if near_sensor.positive:
ob = List[0]
again… this is tied to near sensor named near with true level pulsing on…
If anybody can show me why this is faulting, would appreciate.