Babulesnik
Member
|
RE: Animation does not work
Thanks to everyone who helped me. I got this:
Code:
Str Anim="Anim/1.anim";
Bool Update()
{
if(Kb.b(KB_LEFT))
{
Anim="Anim/2.anim";
}
ObjAnimatable[0].cskel.clear().animate(Anim,Time.time()/10).updateMatrix(ObjAnimatable[0].matrix()).updateVelocities(false);
return true;
}
Still have a question. How do I know when the animation finishes?
|
|
04-18-2011 08:28 AM |
|
Harry
Member
|
RE: Animation does not work
Put event to animation in Model Editor, and then check if event was occured (there are some functions for this).
|
|
04-18-2011 05:58 PM |
|
Driklyn
Member
|
RE: Animation does not work
I'm unsure if you can do this using the Animatable class, but this will work if you are using Motions.
Code:
if (motion.time >= motion.skel_anim->length()) {
// animation ended...
}
|
|
04-18-2011 07:09 PM |
|
Babulesnik
Member
|
RE: Animation does not work
Thank you very much!
|
|
04-20-2011 12:02 AM |
|