Jump to content

[SOLVED] Best way to call a function when an animation finishes?


photo

Recommended Posts

What would be the best way to call a function when an animation finishes?

 

We have short blocks of motion capture data that we need to chain together at run-time (rather than creating a long .sanim). To achieve the effect we want of chaining the animations together I need to know when they are finished. Is there any way in Unigine I can detect that the animation is done?

Link to comment

Hello,

Please, check the following functions:

 - getNumFrames ()
 - getTime ()
 - isPlaying ()

Also, please, check tips and notices on the top of this article and animation samples. They shows how to combine animations using different layers.

To open animation samples enter "world_load samples" in console and choose animation/animation_00.
You can find source files for animation samples in <SDK folder>/data/samples/animation

 

Also you can try to use skinner for animation management.
 

Link to comment
×
×
  • Create New...