Multiple animations?
Multiple animations?
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
P4 2.53MHz 256MB GeForce4Mx VC++6.0
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.
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.
a screen cap is worth 0x100000 DWORDS