[SOLVED]CollisionHandlerPusher object shaking on contact

So basically i have setup simple collision system with two
spheres, and for some reason whenplayer sphere contacts
pillar sphere players starts to shake around pillar.

base.cTrav = CollisionTraverser()
pusher = CollisionHandlerPusher()
pillar = self.pillars[0].getChild(0).getChild(0)
player = self.players[0].model
base.cTrav.addCollider(pillar, pusher)
pusher.addCollider(pillar,player)
       
base.cTrav.showCollisions(render)

base.cTrav.traverse(render)

If i change it to be like this

base.cTrav.addCollider(player, pusher)
pusher.addCollider(player,pillar)

i get

pusher.addCollider(player,pillar)
AssertionError: !collider.is_empty() && 
collider.node()->is_of_type(CollisionNode::get_class_type()) at line 116 of c:\buildslave\dev_sdk_win32\build\panda3d
\panda\src\collide\collisionHandlerPhysical.cxx

Use something like:

collider = player.find('**/+CollisionNode')
base.cTrav.addCollider(collider, pusher)
pusher.addCollider(collider, player)

The “collider” should be whatever CollisionNode you have created for the player, but it’s usually not the same thing as the root of the player. (Though it could be, if you parented the player to the CollisionNode and move the CollisionNode around. In this case, just use collider = player.)

You shouldn’t be adding the pillar to anything at all. It works because just for being in the scene graph.

David

oh thanks…