Collision handler for anything but floor and vertical walls

Hello,

I have wasted a few days investigating the panda3d collision system and unfortunately I’m still stuck.

I would like to use the collision system to handle interactions with wall, floor, roof and obstacles. Now I have recognized that the CollisionHandlerGravity only pushes up (Z direction) and the CollisionHandlerPusher only pushes back horizontally (in x-y plane, z=const).
None of both takes care for the roof.

At least I expected the pusher to (optionally) push back, away from the collision hit point, with respect to the vector the object is moving.

Is there a way to tell CollisionHandlerPusher to really push BACK angular and vertical upwards (jumping against roof) moving objects? Does another Handler exist to accomplish that or do I have to develop an own handler?

I hope someone can help me.

BR,
Michael

CollisionHandlerPusher can push in three dimensions (floors, ceilings, and walls). In 1.7.2, it was horizontal by default; you had to call pusher.setHorizontal(False) to make it three-dimensional. In 1.8.x and above, it is three-dimensional by default.

David

David,

great hint, as usual from you. :wink: Thank you very much.

In the API documentation I found these methods without description quite early, but I didn’t figure out the meaning. Seems so obvious, now.
At least you see which version I use and that I concerned myself with the topic. :wink:

Best regards,
Michael