I am not sure if I am doing something wrong or there is an issue with the Collision sensor.
I have a sensor embedded on the floor, with 2 objects that are moving over it. If the two objects pass over the sensor at different times, then I can register them correctly, i.e. I can detect which hit the sensor and at what time.
However, if they step on the sensor concurrently, then I can only detect one and the other is never detected.
Here is the setup:
Objects 1 and 2 are identical with the following properties: Rigid Body, Actor and Ghost (I tried to also with this disabled, but did not change the behavior)
The python code at the sensor:
own = cont.owner collision_detector = own.sensors["MyReader"] objects = collision_detector.hitObjectList if collision_detector.positive: print(own,' detected: \t',objects)
So when I have the two objects move over
mydetector.000 one after the other, then I get:
mydetector.000 detected [Obj1] mydetector.000 detected [Obj2]
However, if one (
) is already onmydetector.000` and the other passes by then I get the following output:
mydetector.000 detected [Obj1]
Obj2 is never detected. I would have expected the object
objects to become a list, when both
Obj2 are on top of
mydetector.000, however this is not the case.