Collision object list without sensor?

Is it possible to get object hit/collision list without using collision sensor?

I’m adding an object in to a scene and I’m wondering if I could read objects that added object collides with?

So why don’t you want to use a collision sensor for that?

If I do deside to use a sensor on the added object, how could I access that sensor from script running on other object?

Why don’t you access it in the object that is added? An object is added with the complete logic setup it has and ideally objects should run their own stuff themselves.

But you could access it by getting a handle when you addObject() like this:


#get a handle
newObject = scene.addObject("objectTemplate", target, 0)

#access the sensor
newObjectColSensor = newObject.sensors["collision"]

Sounds like you are appending a function to the callBacks list every frame. It just needs to be added once and then u can forget about it.

Oh hah! Silly me ofcourse. Thank you :slight_smile: