Search Unity

Animation played through a value?

Discussion in 'Animation' started by frelind86, Oct 24, 2013.

  1. frelind86


    Oct 24, 2013
    I'm trying to acheave this camera effect:
    (character moves and camera moves on anim curve depending on how far character has moved)

    Any ideas if this is possible?
    Let's say I heave an animated object between frame 1 - 100.

    I'd like to find a way to convert this animation into a clip that can be played through a value.
    So if a character moves from A-B the animation will be played depending on where the character is.

    So if the character traveled 0.5 of the distance half of the animation (up to frame 50) at that point will be shown.
    The character can now continue towards B, which will play the remaining of the animation but could also move backward and reverse the animation.

    A = 0.0 = f1
    B = 1.0 = f100
  2. Pirs01


    Sep 30, 2012
    I'm new to animations and don;t know about animating cameras. In general though if you want to drive your animation based on value you do it using state machine in Mecanim or (I'm guessing here) a script in case of legacy animation system.