/* * In LateUpdate(), Mecanim has already updated the body pose according to the animations. * blend form the saved 'snapshot' ragdolled positions into the animated positions */ bool HandleBlendToAnimation() { // compute the ragdoll blend amount in the range 0...1 float blend = timeSinceStateStart / profile.blendTime; if (blend > 1) { blend = 1; } ragdoll.LoadSnapshot(1 - blend, true); // return true if we're done blending return(blend == 1); }