Intervals are a very powerful feature of Panda3D, which you can see in the recipe Controlling actions using intervals. In this recipe you will go one step beyond and see how to efficiently control animations when used in conjunction with intervals.
If you haven't already, please read how to use intervals in Controlling actions using intervals and follow the steps of that recipe.
This recipe consists of the following tasks:
Open
Application.py
.Delete the line
self.panda.loop("walk")
.Find the following part of the code:
self.pandaWalk = Sequence(self.walkIval1, self.turnIval1, self.colorIval, self.walkIval2, self.turnIval2, self.colorIval) self.pandaWalk.loop()
Replace it with the following code:
self.pandaAnim = ActorInterval(self.panda, "walk", loop = 1, duration = 5) self.pandaMove = Sequence(self.walkIval1, self.turnIval1, self.colorIval, self.walkIval2, self.turnIval2, self.colorIval) self.pandaWalk = Parallel(self.pandaAnim, self...