Collision Traverser giving up

I’m creating bullets to bash about and collide with other ship objects, but after I get about 60 or so in a scene the collision traverser will stop registering collisions with the new bullets. At this point everything passes through everything else until the number of collision spheres drops down.

Collision Traverser:


# Define the Collider
collisionTraverser = CollisionTraverser('traverser')
base.cTrav = collisionTraverser
collisionTraverser.showCollisions(render)

# Event Collision Handler
# collisionHandler = CollisionHandlerQueue()
collisionHandler = CollisionHandlerEvent()
collisionHandler.addInPattern('%fn-into')

Bullet collision creation:


        self.ColNode = CollisionNode("bullet" + self.ID)
        self.ColNode.addSolid(CollisionSphere(0,0,0, 2))
        self.Collision = self.actor.attachNewNode(self.ColNode)
        ClassGlobals.objectDictionary["bullet" + self.ID] = self
        
        ClassGlobals.collisionTraverser.addCollider(self.Collision,
                                                    ClassGlobals.collisionHandler)
        self.accept("bullet" + self.ID + "-into", self.handleCollision)
        self.Collision.show()

This happens with either the Event or the Queue collision handler. The colliders are removed upon bullet destruction.

Is there a cap to the number of collision objects allowed in a scene at any one time?

Thanks,
-Jimmy

In fact, there is. The panda 1.0 implementation allows only 32 “from” objects registered with any one traverser at once; more than that are silently ignored. (This will be fixed in panda 1.1.)

In the meantime, the workaround is to either reduce the number of “from” objects, for instance by declaring your ships to be the “from” objects and all of the bullets “into” objects, or by using multiple collision traversers.

David

Oh, good to know.

when can we await panda 1.1 ???