Jump to content
  • Advertisement
Sign in to follow this  

skeleton animation dx 10 and frames

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

Hy. I'm near to complete my little skeleton animation engine imported from collada files. My problem now is when change the frame in the animation. I have a class timer that get tiks and return the frame rate and the delta time. The animation matrix from collada are on 30 frame/s . I have this code:
render(){

timer.tick();

if(timer.getDeltaTime()==?????????????)
   renderSkinMeshes(....
  }
}

when i must render the skinned mesh?at what deltatime? Is a correct method? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I think you should render the mesh at all times :) Or it will flicker.What you want is to update the animation of the mesh depending on the time passed and the rate of animation.So if the animation is set at 30 frames/second that means 1 frame per 1/30 seconds.So accumulate the elapsed time if it passes 1/30 seconds advance to the next frame subtract 1/30 from the accumulated time and continue.You are drawing the mesh every frame.
Hope this gives some ideas and doesn't cause any more confusion :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!