Caching Animations

Over the time I’ve used Panda3D I haven’t been able to figure out a good way to cache animations. If I have an Actor and I play an animation - it always hiccups the first time I play it. Is there a way to cache animations on an Actor?

In the past to get around this problem I have played animations during the initialization of my game.

I have tried the bindAnim function, and setting the bounds based on the OmniBoundingVolume to no effect. I could be doing this incorrectly - however the question is - in the first place is this approach correct?

bindAnim() will absolutely guarantee that the animation is preloaded and will avoid the hiccup you refer to. For a multipart or multiple-LOD actor, you may find getAnimControls() more convenient, which will automatically make all of the individual bindAnim() calls required for each part and LOD. Of course, play() will also work, but it is a little inelegant. :slight_smile:

Setting the bounding volume has nothing to do with the loading of animations.

David