Sign in to follow this  

How Do They Change Animations When the Player Isn't Moving?

This topic is 3316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want too know how to set up a system where if enum action is set too idle the player's animation will play a idle animation. The problem is if I say changed the 'action' to idle at the end of a 'MOVE_FORDWORD' case where it moves the player fordword I would get a glitch model animation of the animation instantly changing. Because of the case constantly keeps getting called over and over again becuase of a keyboard press. So how can I tell when a function is not being called anymore that it will know too change the 'action' too idle so I don't get the jumpy/lag/glitch effect? VS2008/C++/Win32/OpenGL Project [Edited by - ajm113 on November 14, 2008 9:09:14 PM]

Share this post


Link to post
Share on other sites
You usually don't change instantaneously from a walking animation to an idle one. If your animation engine is good enough, you can blend (get the middle position between two animations frames for each vertex) the last frames from the current playing animation (ex. walk) with the first frames of the next animation (idle). You actually play both animations at the same time, and change the alpha value (how much to use from one animation or the other) gradually from 0 to 100 in a short amount of time.

Btw, "too" in the way you use it is written "to", and "foreword" is "fordward".

Share this post


Link to post
Share on other sites
Oh ok, I got it now. Actually a easier way would be to create a 'advanced' function that's arguments are the object and the frame rate of the model so when ever the functions are being called the model's vertexes 'advance', then if the player isn't moving then have it freeze, so it works out I guest. Instead of having the model 'advance' when the render function is being called.

I was using a single md2 mesh, so bone animations are the next step after the game is done.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dunge
Btw, "too" in the way you use it is written "to", and "foreword" is "fordward".

Not to be picky, but it's actually "FORWARD". Foreword is something at the beginning of a book. "fordward" sounds like someone who is guarding a car assembly factory...

Share this post


Link to post
Share on other sites

This topic is 3316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this