Search Unity

Manually animating an animation clip

Discussion in 'Scripting' started by sevisin, Sep 11, 2012.

  1. sevisin

    sevisin

    Joined:
    Dec 26, 2010
    Posts:
    145
    Hello,

    I was wondering if there was a way to manually animate an animation clip. For example,
    Code (csharp):
    1.  
    2. //pseudo-code
    3. animation.FrameLerp = Input.GetAxis("Vertical");
    4.  
    so if the animation had 100 frames, it would lerp (which has a value of 0.0 to 1.0) with the input.

    Thanks in advance.

    -S
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
  3. sevisin

    sevisin

    Joined:
    Dec 26, 2010
    Posts:
    145
    @andeeeee
    Thanks for the reply. That is exactly what I was looking for :)
    -S