How to pause and resume a vertex animation?

Software: Away3D 4.x

rdoi, Member
Posted: 28 October 2013 08:57 PM   Total Posts: 86

Basically, I want to freeze and unfreeze a scene that contains some vertex animated meshes.

So I can go loop stopping all meshes with animations, but later, I am not sure how to restore their state and resume them exactly from the frame I freezed.

I can detect which animator and animatornode was running. But:

* How to detect if the animator was playing or was stopped?
The vertex and other animators have a nice _isPlaying flag, but it is private and therefore not exposed to us.

* How to resume from the exact stopped frame state?
The only usefull property I could use is its “absolute time”. But is it really reliable to setting it back via “animator.time=oldtime” or “animator.update(time)”.

Am I missing something?

   

drbii, Member
Posted: 16 June 2014 11:37 PM   Total Posts: 72   [ # 1 ]

Did you find an answer to this?  I’m stuck on this too.

   

Avatar
Fabrice Closier, Administrator
Posted: 17 June 2014 09:28 AM   Total Posts: 1265   [ # 2 ]

use something like

//durationValue (between 0 and max duration)
VertexAnimationState(myAnimator.activeState).reset(getTimer()+ durationValue);
VertexAnimator(myAnimator).update(durationValue);

Many vars/methods are “accessible” using namespace “arcane”.

   

drbii, Member
Posted: 17 June 2014 01:14 PM   Total Posts: 72   [ # 3 ]

Sweet!  Thanks!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X