Search Unity

Animation clips

Discussion in 'Animation' started by Dnielsen, Sep 20, 2019.

  1. Dnielsen

    Dnielsen

    Joined:
    Sep 20, 2019
    Posts:
    2
    Hi, i have a problem with my animation.
    Right now i have made 4 clips, called "Retract","neutral","Extend","float".
    they are attached to the 4 buttons called the same, see picture below.
    the problem is, that Retract moves the steel stick in the middle 10mm to the left side, and Extend moves it 6 mm to the left side.
    so if i press retract button and then Extend, it does not go smoothly to extend, it goes to Neutral(my zero position) and then to retract, because all the animations are made from Neutral to(retract/extend/float).
    so i was thinking on to make MANY animation clips like. (retract to neutral/extend/float) (neutral to retract/extend/float) and then (float to extend/neutral/retract). and then control with a script. if i am in Retract position use this clip if neutral is selected.
    and later there will be some more animations added to this.
    i have no idea if this is the best way to do it. but i cant figure out anything else that works for me.
    are there anyone here there can help me with that script, or can tell me another method to do it, i am still new in Unity.
    hope you understand my issue.
    upload_2019-9-20_13-40-52.png
     
  2. Rik_Vasquez

    Rik_Vasquez

    Joined:
    Aug 24, 2015
    Posts:
    17
    I'd check out using lerp. You'll have to write a script but I think it's better than brute forcing this with animation clips.