I’m trying to animate a swordswing (through intervals). I haven’t finished the animation, but am having trouble with it already. When I play the animation (on left click), the sword teleports to the point directly below me (I am the parent object, so I assume that is 0,0,0 for the sword, as it is parented to me). It continues to animate after that, but I am confused as to why it teleports down there rather than moving in place as I intended… I assume that setPos intervals aren’t relative to self? How do I make it so? I saw no argument for this in the docs…
The panda had been small due to scaling changes during some of the animation tests, and so that’s why I know that the sword was below me (the camera is as though one was riding the panda). However, I now cannot check this, because the panda is big again. I tried hide()ing the panda and show()ing the sword, but this didn’t work.
Any ideas?
Here’s the animation code:
Note that the posInterval was 10,10,5 when the sword showed up below me.
#Test Animations for Sword
self.wpi1=self.weaponm.posInterval(2,Point3(.05,.05,.025),startPos=Point3(0,0,0))
self.whi1=self.weaponm.hprInterval(2,Point3(-90,0,0),startHpr=Point3(-45,0,0))
self.swing=Sequence(self.wpi1,self.whi1,name="swing")
It is played through a simple self.swing.start() command in a task for the left click.