I think this is the right session.
Hi, I am having some pretty strange trouble with my animations. I load five characters (the model and the textures are loading fine), but when I try to animate them, only two are being animated.
I can see all the animations on pview, but in-game, some simply would not work (no errors/warnings are shown).
Here is one example of how I load a character:
sampleMage = beingClass.being(worldManager, gridElement, "models/Mage/mago", {"walk":"models/Mage/anim_caminha", "attack":"models/Mage/anim_ataque"}, 0.02, 15, -45, 0, '../chars/ralph.txt', 2, spellMngr)
The third argument is the main model and the forth argument loads the animation name and the egg that contains it.
Here is the code that animate them (the position doesn’t change):
def attackAnimation(self, theWorld):
formerState = theWorld.getState()
theWorld.setState("stopAndAnimate")
interval = self.classModel.posInterval(3,
Point3(self.getPosX(), self.getPosY(), self.getPosZ()),
startPos=Point3(self.getPosX(), self.getPosY(),self.getPosZ()))
animation = Sequence(interval, Func(self.endAttackAnimation, theWorld, formerState))
self.classModel.loop("attack")
animation.start()
def endAttackAnimation(self, theWorld, formerState):
theWorld.setState(formerState)
self.classModel.stop()
Any ideas are welcome.
Thanks in advance.