0
\$\begingroup\$

Anyone around who is experienced with Unity animation states and the Animation Controller? I wonder is it possible in Unity to change the duration of time it takes between motion transitions in the Animator Controller?

To give an example let's say I have a human character that has an initial state of Grounded and in this state I have several motions like idle, running forward/backward and strafe left/right. When I now have the character in idle and I move left/right to go into strafe motion, the duration of the transition from idle to strafe left/right takes too long and I want it to be faster. I only want that transition between the motion states to be faster but not the actual animation itself. I think there should be a way to do this but I can't find any options for changing the duration between motions.

I'm aware that the duration between states can be changed by selecting a transition connection between states but what I'm talking about here are the motions inside a state.

\$\endgroup\$
  • \$\begingroup\$ Hey I am really confused here , correct me if I am wrong. Are you referring to change in state happens only at the end ?? For example while switching from idle to left , the transition only happens at the end of idle state and not when it is triggered . And what exactly you mean by motion inside the state ?? \$\endgroup\$ – Hash Buoy Oct 22 '15 at 19:41
  • \$\begingroup\$ By motions I mean the parts that are inside a Blendtree. Sorry for the confusion! Of course a state that is not a blendtree is actually a motion itself. So the real question is: If I create a blendtree and I have motions inside that blendtree (if you r-click on a blendtree box you can add only motions or blend trees) how can I change the duration between the transitions of these motions inside that blendtree? \$\endgroup\$ – BadmintonCat Oct 23 '15 at 4:14
0
\$\begingroup\$

You can make use of threshold to achieve this. If you place the threshold of two events close to each other then the transition will happen very quickly. But this gives rise to a new problem, i.e. the animation state in the center does not stay active for a longer time. For that we add the same animation twice and put its threshold to the desired max range

Refer to the following image enter image description here

  • In this set up , the value from 0 to 0.2 will be the transition from left to center.
  • The value from 0.2 to 0.8 will transition between same animation hence there wont be any difference as identical animations are getting blended .
  • Then from 0.8 to 1 will be transition to right.

So in this way the transition is restricted to a range of 0.2 rather than 0.5 (which is typically seen in the normal setup i.e. 0 to 0.5 to 1) . Refer to the following image. enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.