Making a trigger play

I have a problem, I’m trying to make this animation play from the, “Any State,” Tab. the Connecter from the the, “Any State,” to the animation is a Triger. And I’m trying to make it so when a bool is active it plays this animation.
I tryed, “animator.SetTrigger(“My animation”);” but it didn’t work. and I don’t know what else to try. If you could help that would be great

Make sure you're passing in the name of the trigger, and not the name of the animation state. It is case sensitive too.

1 Answer

1

The parameter of the function SetTrigger is not "My animation” but the name of your trigger for example “My Trigger”

Edit: If this doesn’t work, could you share a screenshot of your animator so we can see the wiring and the parameters please?

I was just using the Name "My Animation." as an example, but the actual name is "Jump." But I also added the picture to the post

Ah yeah you nammed the animation and the trigger the same, Can you show the arrow between the AnyState and jump please? did you make sur you have the proper trigger selected?

The Problem was Solved by changing the "Can Transition To Self" bool on the transition for any State to false