O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling animations

Since we're talking about the loop() method, let's start discussing some of the different controls for playing and stopping animations. There are four basic methods we can use:

  • play("AnimName"): This method plays the animation once from beginning to end.
  • loop("AnimName"): This method is similar to play, but the animation doesn't stop when it's over; it replays again from the beginning.
  • stop() or stop("AnimName"): This method, if called without an argument, stops all the animations currently playing on the Actor. If called with an argument, it only stops the named animation.

Tip

Note that the Actor will remain in whatever posture they are in when this method is called.

  • pose("AnimName", FrameNumber): Places the Actor in the pose ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required