Sign in to follow this  

Animation Speed

This topic is 4360 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

Hi, I'm not very sure where to post this since I'm newb and all. I am trying to make a small 3D game with C++ whereby the charcter will run. The modeling is done in 3DS Max, saved in MD2 together with the animation. My question is, is it possible to manipulate the speed of the running animation in C++? e.g. if the character increased its speed, the running animation's speed should follow. Thank you.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

In order to interpolate the animation at a constant speed, you would do something like the following:

vertices = current_frame + (next_frame - current_frame) * CONSTANT * time_since_last_frame

to make the animation vary in speed, you just need to keep track of the player's speed and factor it into the above equation. e.g.:

vertices = current_frame + (next_frame - current_frame) * CONSTANT * time_since_last_frame * PLAYER_SPEED

Share this post


Link to post
Share on other sites

This topic is 4360 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