State machine and button pressed/released

Hi. I am starting to learn about animations in UE4 and I cant figure out hot to setup state maachine with button pressed

I have a Variable “isLTpressed” setup in 3rd person character

In Animamation BP I am casting to a character to ask for the variable

When I print it it work nice. When Button is being pressed it prints true and when I release the button it prints false

the variable is set for a transition rule


But ingame it doesn work… when button is pressed character seems to stutter a bit and only enters animation when I release a button and to stop playing I need to press it again…
Even when at the same time it is printing the variable state correctly in the real time…

Does anyone know what am I doing wrong? Thank you

Are you sure your others states aren’t conflicting ? If it happens only when you move It’s because you didn’t do a rule from walk to HipAim.
Make a new rule with the same “Is aiming” bool but from Walk state to HipAim.

Edit: Oh… it was really stupid mistake from my side :smiley: I did not put "NOT "after variable… I was thinking the enter transition is always looking for true and exit transition for false… but it is no…