Page 1 of 1

Multiple animations?

Posted: Fri Jan 09, 2004 3:38 pm
by Keanu
I was wandering wich is the best way to load multiple animations? I'm using Milkshape 3D and I'm creating one mesh for each animation. When the player walks I display the mesh with walking animation and hide all the others and when he attacks, I hide the mesh that walks, move the mesh that attacks to the current position and display it; and so on... I really think this is not politically correct

Posted: Fri Jan 09, 2004 4:39 pm
by keless
definately not the right way.

only have 1 mesh.

lets pretend you've got 4 different animations, who's frame counts are 5, 10, 10, and 20.

you should apply all these frames to the same mesh in one mesh file-- so it has one long animation of 45 frames (which represents the 4 different animations all one right after the other).

In your game logic you tell an animated mesh what frames to use. to run the first animation, tell it frames 0-4. When you want the 2nd animation, tell it frames 5-14, for 3rd animation 14-23, for the last animation 23-44.

Posted: Sun Jan 11, 2004 12:33 pm
by Keanu
Thank you as always you solve all of my problems!