Search Unity

Animation for attached weapon question

Discussion in '2D' started by Mystic_Quest, Aug 1, 2018.

  1. Mystic_Quest

    Mystic_Quest

    Joined:
    Feb 22, 2016
    Posts:
    47
    Made a mage sprite and attached a staff. Through the animation window I edited every frame to move the staff while he is walking. The staff however looks kind like it is floating because it moves smoothly when it changes positions while the mage sprite has specific clips. Can I make the staff just instantly change its position at every clip of the animation instead of it smoothly moving to the new position at each animation cli[p?
     
  2. barskey

    barskey

    Joined:
    Nov 19, 2017
    Posts:
    207
    The animation clip uses curves to move between your keyframes. If you are changing the transform.position at each keyframe, you could set the curves to be "steps" rather than smooth curves. Click on the curves button in the Animation window to explore.
     
    Mystic_Quest likes this.
  3. Mystic_Quest

    Mystic_Quest

    Joined:
    Feb 22, 2016
    Posts:
    47
    Worked great thanks!
     
    barskey likes this.