Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Why is my blend tree's transitions so weird?!

Discussion in 'Animation' started by gsus725, Mar 4, 2015.

  1. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250

    As you can see I have two identical punch1 animation states the only difference is that the first state is at 0.01x speed and the other is at 1x speed. I then have a blend tree that blends between them using a paramater called "attack animation speed" which is controlled by a character's speed stat in a script.

    In the game the character can upgrade their attack speed as they progress so that is the purpose of this blend tree. The problem is that even though I have it set so that 0.01 threshold is 1% speed, and 1 threshold is 100% speed, everything in between produces "wrong" results. 0.5 threshold should be 50% speed I thought, instead it is like 5% speed. And even 0.9 threshold is something like 15% speed.

    Why does it do this? I need it to match the threshold or I need to know the formula so I can backwards engineer that for my scripts to know how fast the animation will be on any given threshold.

    Thanks for any help.
     
  2. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250
    With "attack animation speed" set to 1 the animation lasts 0.27 seconds. With it set to 0.5 is lasts 23.5 seconds, 87x longer. And on 0.01 attack animation speed it is 27 seconds which is exactly 100x longer as it should be.