Problem with actorInterval

I’ve a little problem with my animation.
I detect the collisions between an object and a character. I would like to play an animation when the collision is detected.

But that don’t work !

It’s my function when my characters are created, I create a actorInterval

def setModel(self,model,animName):
        self.animName = animName
        self.obj = model
        self.anim = self.obj.actorInterval(self.animName)

It is my function when the collision is detected

def CollisionAnswer(self):
        self.anim.start()
        print 'anim play'

When the collision is detected the message ‘anim play’ is write on the console, but the animation is not played

Thanks a lot for your response


Sorry for my English, I’m French and I don’t speak very good English.

I don’t see an obvious problem. Possible places to look are: are you sure that the animation in question loaded successfully? Are you sure that the model you see onscreen is in fact the same object as self.obj? Can you call self.obj.play(self.animName) and see the animation? Is there any other ActorInterval already playing that might be competing with this one?

David

Yes i’m sure the animation is loaded, the model i see it’s the same obhect as self.obj. I tested that.

When I call self.obj.play(self.animName), i don’t see the animation too.
I have no other actorinterval in my scene.

can you show us the line where you load your actor?

I had a problem with my animation in 3dsmax.
I fix it and now it work.

Thank you for your help