physics glitch

still digging panda3d physics, I came at the conclusion the issue formerly reported was indeed a sign of something is wrong with it. I packed an example to reveal it just in case some dev is interested but to quickly recap here for the audience, the topmost nodepath loose the sync with the physics actor nodepath in a collision simulation, either using the suggested setup in the manual or whatever else one could try.
The snippet to try is here for download for those interested.

Oh I see now. The camera is not tracking its change of position due to gravity…

yep, it is following the ghost of the topmost nodepath - it is easy to see that the Actornode is not synchronized with the above nodes - I actually cant see a node structuring good to overcame this - the only solution is to resync everything within a task programatically.

In phyball_dispenser I don’t see the reason for the extra nodepath above the actor’s nodepath.

Everything seems to work fine using this

def phyball_dispenser(modelname, scale=1.):

  ballCollider = ballNP.attachNewNode(CollisionNode('ballcnode'))
  ballCollider.node().addSolid(CollisionSphere(0,0,0, 1*scale))
  collisionHandler.addCollider(ballCollider, ballNP)
  base.cTrav.addCollider(ballCollider, collisionHandler)

  return ballNP


indeed, but just in this specific case - if I try to do something different it shows weid behaviors. BTW your modified dispenser is exactly the same I posted in my former issue here :wink:

:laughing: So it is.

So what’s the reason for the extra nodepath above the actor’s? I can’t think of any weird behaviors that might result from not having it and I didn’t see any in this demo. There might be a different workaround. If its unavoidable you could always use a task and something like nodepath.setPos(nodepath, nodepath.getchild(0).getpos()) to sync them every frame