Search Unity

Animation played through a value?

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

  1. frelind86

    frelind86

    Joined:
    Oct 24, 2013
    Posts:
    5
    I'm trying to acheave this camera effect:
    http://youtu.be/952NoFhRBGA?t=4m53s
    (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

    Pirs01

    Joined:
    Sep 30, 2012
    Posts:
    389
    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.
     
unityunity