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 Answer 1

1
$\begingroup$

Nvm, found the answer:

it would be:

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

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .