Jump to content
  • Advertisement
Sign in to follow this  
Byron

Working out the end of animation from X File

This topic is 3967 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 have an xfile with anims in it. I need to work out the length of the animation using just the data contained in the xfile. The docs say that the anim keys express the time but they don't say what units that time is in. Here is an example of one of the anim keys I am trying to interpret: AnimationKey { 0; 7; 0;4;-1.0,0.0,0.0,0.0;;, 120;4;-0.999629,-0.027224,0.000000,0.000000;;, 240;4;-0.995757,-0.092023,0.000000,0.000000;;, 360;4;-0.985645,-0.168833,0.000000,0.000000;;, 480;4;-0.972614,-0.232427,0.000000,0.000000;;, 600;4;-0.965926,-0.258819,0.000000,0.000000;;, 1200;4;-0.965926,-0.258819,0.000000,0.000000;;; } the last frame has an animation time of 1200 but what does that mean? Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
If the X file doesn't have the AnimTicksPerSecond templated defined, then it's not possible.
Just assume a default sampling rate of 160 ticks/frame = 4800 ticks/sec = 30 fps.

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!