1
$\begingroup$

Is there a way to determine which object has been detected with the sensor? For example, if the owner's collisions sensor turns positive, is it possible to get the object collided with?

Something like this:

if own.collisionSensor.positive:
   obj1 = owner of detected collision object
   (print obj1)
$\endgroup$
1
$\begingroup$

Nvm, found the answer:

it would be:

if collision.positive: obj1 = collision.hitObjectList[0]

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.