When spawning an object into a game, I check its hit objects from my master python script, accessing the object spawned in.
For some reason, the "Collision" sensor does not exist in the object, although I can put any controller into the object and that is accessible.
Heavily simplified code to explain what's going on:
c = bge.logic.getCurrentController() o = c.owner s = o.scene sph = s.objects["Sphere"] col = sph.sensors["Collision"] # doesn't work a = sph.controllers["And"] # works for some reason col = a.sensors["Collision"] # also doesn't work
The code worked a few days ago, but has mysteriously stopped working and I am at a loss as to what's going on. Any ideas would be greatly appreciated.
When looking at the object, it may have controllers, but the actuators and sensors both return an empty list.
Edit: I had disabled collision on the object, please do not make the same mistake as me.