Play Mechanim Clip Immediately


How do I tell Mechanim to play a particular clip immediately?

As far as I can tell, if it's in the middle of one clip, it has to wait until that clip ends before it will read the state and decide on a new course of action.

Thank you,

1356424--67148--$Screen Shot 2013-09-04 at 11.02.59 PM.png

Right now I'm using a custom int variable that I change, and the animations start based on the value of that number. But this only works once the animation has completed. Is there a better way to do this?

Thank you,

The animator should transition as soon as the conditions are true. If one of those conditions are "Exit time," then it won't transition until that time is reached.

You can use multiple transitions from a state, I just learned. Create another exit transition from a state and then the transition line will have 3 arrows. on the first transition you can leave the exit time, and on the second one you can make a bool forceExit parameter that you can switch on for a frame and then it will transition out on command. Just make sure to turn it off the next frame. I haven't done this myself yet, but it's worth a try.