Weird CollisionHandlerPusher behaviour

Hey panda’s,

Im trying to use the CollisionHandlerPusher but it behaves very weird.
Watch this video, then you’ll know what I mean.
The terrain consists of just 1 egg file.
This is my code:

    base.cTrav = CollisionTraverser()
    self.camsphere = CollisionNode('camsphere')
    self.camCollHandler = CollisionHandlerPusher()

(and some more movement code to move self.playerdummy)

Can anybody help me?

I think this is the same problem I have encountered some time ago:

“Sharp” (90 degree or more) edges seem to be the problem. I have tried to compile Panda3D myself and play around with the collision code. But I didn’t spend much time on understanding how it works, and so I wasn’t surprised that I failed here.

My solution so far: using a physics engine (ODE, Newton, Tokama, …)


isn’t there a way to achieve the same result using a queue or something else?

I think the problem is the way the pusher handles the collisions. The collision systems find two or more normals in contact with the sphere, and the pusher selects one of them, and then applies a correction according to the one collision normal it has selected.

But I don’t know enough about Panda3D internals to give a solid answer here. drwr might be able to.

Using a queue could work, but then you have to implement collision response yourself, since queue is (AFAIK) only a list of collision entries, and nothing happens if you don’t code a response yourself.


Did you try to turn on debug messages for the collision system? I think this is how I did back then:

loadPrcFileData( '', 'notify-level-collide debug' )

It will be very spammy, so a re-direct to a file might be usefull. Perhaps this way (by comparing the messages with the Panda3D source code) you might be able to narrow the problem down to a particular part of the code.

Thanks enn0x.

I wasn’t able to fix it- so I now use a CollisionHandlerQueue, and each frame it checks whether there was a collision or not, it there was, it sets the position to the previous one. It doesn’t slide along the wall anymore, but it doesn’t penetrate the wall either.