Which Animator is which?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
lokiare
Posts: 40
Joined: Wed Feb 04, 2009 5:40 pm

Which Animator is which?

Post 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?
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Re: Which Animator is which?

Post by shadowslair »

Code: Select all

for all animators in your list
{
    if (animInList && animInList->getType() == ESNAT_COLLISION_RESPONSE)
     printf("found!\n");
}
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
lokiare
Posts: 40
Joined: Wed Feb 04, 2009 5:40 pm

Re: Which Animator is which?

Post 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)
        {
        }
}
 
Post Reply