[Solved] Multiple Handlers With Same Collision Solid?

Quick question, I’m trying to use a CollisionNode with a CollisionSphere in multiple handlers (PhysicsCollisionHandler and CollisionHandlerEvent). The basic operation I want is for an event to be triggered when the CollisionNode hits a CollisionPlane, but I also don’t want it to be able to go through the plane. What I’ve noticed is that adding the first handler with the CollisionNode to the traverser is the one that works, so I either get the Physics handler or the Event handler, not both. How do I get both working?

It looks as though PhysicsCollisionHandler extends CollisionHandlerEvent, so you may be able to use the same handler for both purposes: you should be able to create event patterns and register events with your PhysicsCollisionHandler as though it were a CollisionHandlerEvent.

Yeah, that worked. Thanks so much for the help! Did I miss that point in the documentation?

Funnily enough, no, I don’t think so: that seems to be a gap in both the manual and reference. I believe that it does, I believe, mention that CollisionHandlerPusher extends CollisionHandlerEvent, which prompted me to think that PhysicsCollisionHandler might well do so too. I actually ended up loading an instance of PhysicsCollisionHandler into a Python shell and checking its inheritance with “isinstance”, as I recall.