Collisions and Intervals

Hello there,

I just started programming with Panda3D and Python a few weeks ago and I got stuck with the following problem:

In my project there is a server that will receive messages from clients telling a character to move. I decided to use intervals to move and animate these characters, but it seems like they don’t work very well with the CollisionHandlerPusher, as the characters will collide, but often pass through the walls when they are moving.

At first I thought it was something about using the “fluid” parameter when building the interval and calling the “setRespectPrevTransform” method, but even after doing that, it won’t work!

Is there a known problem in using collision detection with intervals or am I doing something wrong? If there aren’t any known problems, can someone give me an example of how to do it?


Right, intervals aren’t really designed for use with the collision system. Intervals are primarily intended for fully scripted playback, while the collision system is exactly the opposite of that, since dynamic events can occur at any time.

When an interval tries to move the object, it continually resets the object’s position every frame. It will keep pushing the object deeper and deeper into the wall until eventually the collision system has to surrender.

You’re probably better off using a task to move your objects in this case.


Thanks, it seems that using tasks everything works just fine! :slight_smile: