[VertexAnimation]Control times of animation playing

Software: Away3D 4.x

sucresk, Newbie
Posted: 15 October 2012 06:10 AM   Total Posts: 1

I want to control times of vertex animtion playing, this model is md2 format.So I set the ‘looping’ of instance of Class VertexAnimationState to ‘false’, but when the animtion play,  a error appear in function updateFrames of Class VertexClipNode,“index out of range”. so I edited the code of updateFrames like this:

super.updateFrames();
   if (
_currentFrame >= _lastFrame)
      
_currentFrame _lastFrame 1;
   
_currentGeometry _frames[_currentFrame];
   
   if (
_looping && _nextFrame >= _lastFrame)
      
_nextGeometry _frames[0];
   else
   
{
      
if (_nextFrame >= _lastFrame)
         
_nextFrame _lastFrame 1;
      
_nextGeometry _frames[_nextFrame];
   

Everything is ok. then I can listen aimationStateEvent.PLAYBACK_COMPLETE to control the times of animtion play.
I am not sure this is right or not. If you know another method,plase tell me. Thank you! -_-|||

   

pyramid, Newbie
Posted: 29 October 2012 10:49 AM   Total Posts: 2   [ # 1 ]

I could not understand what you mean very well

   
   
‹‹ Bounding Sphere Size.

X

Away3D Forum

Member Login

Username

Password

Remember_me



X