Search Unity

manually mix & apply animation clips?

Discussion in 'Animation' started by JoeStrout, Oct 11, 2014.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Is it possible to manually mix and apply two AnimationClip references? Something like this:

    Code (CSharp):
    1. void ApplyPose(AnimationClip clip1, float time1, AnimationClip clip2, float time2, float mix) {
    2.    // Set our avatar to 'mix' (0-1) amount of the pose from clip1 at time1,
    3.    // and 1-mix of the pose from clip2 at time2.
    4.  
    5.    // (insert magic here)
    6. }
    I often get tired of wrestling with Mecanim state machines, and in some cases I'd like to just take control of the animation myself. If I had the function above, it would save me an awful lot of grief.

    But I can't find any way to do that. Is there a solution I'm missing?

    If nothing else, is there a way to simply read the pose (various bone positions/orientations) out of an AnimationClip at a specified point in time?