   [Solved] Animation Controller
  Hi guys, i have just got my meshes animating, and  thought i was ou tof the woods, but not yet.I have an .x file with animations and it is setup in such a way that the person animates like so:T pose -> Standing Pose -> Walking Animation -> pause -> obviously this is then looped.How do i tell directx to loop from frame 2 to 60, i can find the code and i can't see how the functions could do what i asked.I was looking for a GetAnimationTime() function so that when it reached x time i could reposition it but i can't find it, and i really don't believe i can't do this.Is there another concept/way of going about this that i haven't thought of.Any help/advice welcome.JamesCobrasP.S. i can't and don't want to change the way my mesh is exported.[Edited by - JamesCobras on May 16, 2009 1:02:46 PM]
  I believe the d3d is "animation track." You want to loop a particular track and or do track transitions.Thats about all I've got for you, I always write a custom animation controller myself.   ;  Hi, first look if the mesh have tracks, if they not, you should knowhow much time last each animation. The way i do that:static double time = 0.0;D3DXTRACK_DESC Track;YOURMESH.AnimController->GetTrackDesc(YOURMESH.CurrenTrack,&Track);LPD3DXANIMATIONSET set;YOURMESH.AnimController->GetAnimationSet(YOURMESH.CurrenTrack, &set );time = Track.Position / set->GetPeriod();In the above code, you receive the entire track and the animation set,in that way you can know the current time of the animation, the timegoes from 0 to 1.0, then the track repeats the animation, its periodic,so, you have to reset the time to zero, for example:if(time < .99){YOURMESH.Move(elapsedTime);}else{YOURMESH.NextTrack();time = 0.0;}Something like that, be creative.;  Thanks Guys that's perfect.Jamescobras   