Page 1 of 1

Which Animator is which?

Posted: Wed Jul 06, 2011 8:00 pm
by lokiare
If I have several animators attached to an IAnimatedMeshSceneNode, how do I tell which one is which?

For instance to get a list I can use

animatedMeshSceneNode->GetAnimators(). Which gives me an Irrlicht style list of animators, but how do I tell from that list which is my collisionresponse animator and which is not?

Re: Which Animator is which?

Posted: Wed Jul 06, 2011 8:18 pm
by shadowslair

Code: Select all

for all animators in your list
{
    if (animInList && animInList->getType() == ESNAT_COLLISION_RESPONSE)
     printf("found!\n");
}

Re: Which Animator is which?

Posted: Fri Jul 08, 2011 8:31 pm
by lokiare
Cool... Based on your code got it working great with :

Code: Select all

 
for each (ISceneNodeAnimator * animator in node->getAnimators())
{
        if (animator && animator->getType() == ESNAT_COLLISION_RESPONSE)
        {
        }
}