I don’t see anything obviously missing. There are a number of ways to debug this.
First thing to try is:
messenger.toggleVerbose()
to see if it is detecting the collision, but sending an unexpected event name. You can also try:
self.cTrav.showCollisions(render)
to enable a mode in which all of the collisions that are tested are highlighted in yellow, while the collisions that are detected are highlighted in white (with a few other colors thrown in for various meanings).
If neither of those produces any useful insight, you can try the nuclear bomb of collision debugging: full verbose spammage. You probably only want to do one frame of full spammage, because it is a lot of output to wade through. Position your character so that it is intersecting the wall, and then do:
The first command turns on spam output for the collide category; it’s equivalent to putting “notify-level-collide spam” in your Config.prc file. The second line runs the traverser, and the third line puts the output level back to normal.
In this output, you should see it walking through the scene graph and considering each node that it visits. You may then gain some insight into why it is or is not detecting the collision that you expect it to detect with the wall.
I did setup a line about base.cTrav = self.cTrav but forgot to show in my preceding code; it’s not working.
I just did a quick test… the collision message was not throwing out (nothing happened when collided), and the collision wall’s color was…interesting.
(yellow before collided, white when collided, and grey when un-collided again)
I’ll take a deeper dig tomorrow.
Thanks again for David about your step-by-step debugging techniques. It’s extremely helpful and let me have the courage to face Panda…forever!
Ah, so now I see the problem. From the description of your symptoms, your CollisionHandler is detecting the collision, but your CollisionHandlerEvent is not throwing events.
Eek! You’ve just created two CollisionHandlerEvents, one called self.cHandler, and another one called self.collHandEvent. Then you enable the event on the second one, but the one you actually use is the first one!