Jump to content
  • Advertisement
Sign in to follow this  
LilTrooper

CloneAnimationController

This topic is 4877 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

As it stands, I have a class that keeps one copy of the AnimationController object. When I make a new instance of the animation, I reference this animation controller and use it to call CloneAnimationController. As a paramter I pass in a local copy animation controller to be used independently.
//This is the main animation controller
LPD3DXANIMATIONCONTROLLER pAC = NULL;

if(m_pDevice != NULL)
{
   if(S_OK == D3DXLoadMeshHierarchyFromX( xFile,
  				          D3DXMESH_MANAGED,
					  m_pDevice,
					  &pAH,
					  NULL,
					  &pFrameRoot,
					  &pAC ))
}


//In another class, this is the local copied instance (m_pAC)
pAC->CloneAnimationController( pAC->GetMaxNumAnimationOutputs(),
                                      pAC->GetMaxNumAnimationSets(),
                                      3,
                                      pAC->GetMaxNumEvents(),
                                      &m_pAC );


The problem is that when one animation is running, it works fine. However, as soon as another animation is created, neither animations work at all. Do I have to create a whole new AnimationController for each instance? Isn't the point of the cloning function to allow multiple animations referring to a common main controller? Thank you for any help you can offer.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!