Animation Switching System
hello,
well, I am currently working on my character animation. so I want him to be able to walk, and jump, and do a 3 combo punch, aim with the gun, shoot, sneak...you get the idea. I've done the animation in 3d studio max, and exported them to x-file, with one animation set for each action (walk, run, jump....).
here comes the hard part, I spent a lot of time trying to find how to make the transaction between the animations, (so the character is standing, then I press UP, he should just start to run, then loop the running animation, when he stops, play a stopp running animation). All I came to is the many nested if elses, but I think that this isn't the bestway to do this.
So could any one tell me what is the best approach here please, and what is you own experience in this.
Thanks.
You probably want to look up 'finite state machines'. The idea is that each animation sequence would be a state and events like 'up' cause the machine to transition between states. Your nested if/else tree does essentially the same thing but FSMs are more general (and more readable).
I could give an example but I think you'd do best looking it up yourself and learning the theory rather than just a single example (since they're useful elsewhere too). Try this to get started.
I could give an example but I think you'd do best looking it up yourself and learning the theory rather than just a single example (since they're useful elsewhere too). Try this to get started.
Take a look at this
http://www.gamasutra.com/features/20030704/edsall_01.shtml
I'm no professional here but I think this would provide the most realistic method of animation. It also may be more detailed than what you are looking for.
Do a search on Animation Blending and you will find lots more good information.
Hope it helps,
Webby
http://www.gamasutra.com/features/20030704/edsall_01.shtml
I'm no professional here but I think this would provide the most realistic method of animation. It also may be more detailed than what you are looking for.
Do a search on Animation Blending and you will find lots more good information.
Hope it helps,
Webby
It doesn't exactly offer you an implementation, but there's my answer to a previous, similar question, using state machines and with an example of the concept.
http://www.gamedev.net/community/forums/topic.asp?topic_id=280107
http://www.gamedev.net/community/forums/topic.asp?topic_id=280107
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement