How can I get my AnimBP to consistently start/stop?

I have a network in my animation blueprint that asks when the screen is touched, and to return a true or false value to the variables “IsTouched” which are in turn plugged into my state machine transition from an idle animation to a looping bounce animation.

Ideally, the animation would play when the users touches the screen and IsTouched is set to true, and would return ti the idle animation when IsTouched is set to false.
The problem is that when the screen is touched, the transition doesn’t always occur, even when I tap the screen multiple times. And even though the print string is telling me IsTouched is set to False, the animation will continue to play without transitioning back to the idle. What am I doing wrong?

I’m assuming you have it set to “not” for your transition?

Bump. Is there any information that I could give that would make it easier to diagnose my problem? Or is the solution something really simple that I’m overlooking?

A screenshot of your State Machine may make it easier to diagnose.

Your handling of the isTouched variable seems fine to me, but the actual behavior largely depends on what you actually do with isTouched, and where…

That solved it perfectly!! I thought that having it set up in my event graph to switch between true and false based on the value of “is input key down” was enough. Adding “NOT” for my transition from the bounce animation to Idle made it function perfectly. Thank you so much!

Thanks! :slight_smile: