MD2 Animation question

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Martin

MD2 Animation question

Post by Martin »

Hi.
I have a question about md2 animation. How can I stop an animation at any time?
For example, I have a MD2 model, a guy, and when I press the key, the guy moves in an animated walk, but when release the key, the guy stop and the animation must stop.
How can I stop and resume an animation?
Thanks :)
java_man
Posts: 6
Joined: Wed Jun 15, 2005 6:46 pm

Re: MD2 Animation question

Post by java_man »

Martin wrote:Hi.
I have a question about md2 animation. How can I stop an animation at any time?
For example, I have a MD2 model, a guy, and when I press the key, the guy moves in an animated walk, but when release the key, the guy stop and the animation must stop.
How can I stop and resume an animation?
Thanks :)

Try using:

Code: Select all

			model1->setAnimationSpeed(0);
A value > 0 starts the animation up.
Games are fun to play but great to create.
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

would ofcause not look good
the crusial thing here is if irr can return the actual visual frame??
It is needed that the 'freeze' frame is one that leave the model in an belieable stands
eg setAnimationSpeed(0); should not be invoked before the animation was in its natual stands cyclus -say frame 58..65
so..
does irr have a method to return the visual frame of an model??

geee i miss a purpose oriented method survey:(
Honestly -how would it be posible to find this information from the present documentation?
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Jarlaxle
Posts: 10
Joined: Wed Jul 06, 2005 6:43 am

Post by Jarlaxle »

I've implemented this by not stopping the animation once the key is released, but by setting it to EMAT_STAND. This looks much more natural in my eyes...
There are only 10 kinds of people - those that know binary and those that don't.
Post Reply