My problem is, when I want to immediately fire a transition with animator.SetTrigger command, if the character is already playing another transition, it will wait until it finishes before playing the new one. This feels weird when you need a fast response on the animation (for example in attack transitions, you want them to start instantly, no matter what is going on).
Is it possible to interrupt the transitions in progress by code?
You can. If you click on the transition arrow, there’s a section in Settings called “Interruption Source” that you can change to tell it what is allowed to interrupt that transition. It’s kind of complicated to use though. This blog goes into a lot of detail on how to use it:
Oh, wow. This is a big one. I’ve been trying to find this information literally for months, and honestly I was a bit hopeless to find an answer here.
That post should be part of the main Unity help reference, or at least be linked or refered somewhere.
Yeah, Unity has a bad habit of putting really important information in their blog instead of in the actual documentation. There are tons of Unity features I’d have no clue even existed if it weren’t for a random blog post.
I agree, it’s a poor habit. I like that they do actually make this information but I have had to search +blog to get some information (enlighten, etc) from the blog and it’s only because I check often enough that I’m mindful of what to look for in there. I’m sure I’ve missed some too.
@Buhlaine maybe some docs people can plunder the blog often or maybe the learn team can use some of these materials.
I think really though, Unity is going best it can. If you think about it, it’s a lot of documentation to cover and it keeps changing.
I always say Unity is the most documented platform ever. It’s really easy to find information about almost anything you want to find. Maybe that’s why I miss this kind of documents to be easier to find.
It doesn’t work, that was one of the first things I tried. The transition to the walk state remains running. And sorry about the necro, this thread is what popped up on google when I searched for the topic.
I think it’s pretty easy to make a new state that immediately transitions back to the state with the blendtree, and jump to that new state if you need to interrupt.