Page 1 of 1

Multiple animations of mesh triggered by keys during runtime

Posted: Fri Aug 26, 2011 1:17 pm
by brick
I want to place a mesh on the scene, and then play separate animations of the same mesh by pressing various keys. I have modeled and animated an object in 3ds Max, and I have placed it on the scene. But (and this is really a question for someone knowledgeable in 3ds Max) is there a way to create and export multiple animations of the same mesh? And how do you suggest I go on about triggering those animations with keyboard during runtime of Irrlicht program? Maybe do something with EventReciever, similar to what was done in the tutorial about movement?

Re: Multiple animations of mesh triggered by keys during run

Posted: Fri Aug 26, 2011 1:29 pm
by mongoose7
You will have to create only one animation as a combination of all your different animations. You then specify the start and end frame when you want to play one of the animations.

If you detect a key-stroke for a different animation you just reset the start and end. You may need a bit of own code to handle the transition, if you want it to look realistic.

Re: Multiple animations of mesh triggered by keys during run

Posted: Fri Aug 26, 2011 1:35 pm
by brick
Ah, that makes sense, creating a single animation track and then cutting at various frames. Thanks a lot, I will try that.