So I’ve done a lot of searching on Google and YouTube because there appears to be many solutions to this type of question, but so far nothing I’ve tried works. I’m still very new to Unreal so I might be overlooking something basic - if you suggest an answer, please be as thorough as possible as I’m still a beginner!
I’m making a third-person demo and I’ve added a function to the Third Person Character BP that allows a charged attack when the right mouse button is pressed down. When the button is down, the Boolean ‘Charging?’ is set to true, and then the damage variable increases over time. An animation montage also plays (one animation for ‘charging’ and another animation for ‘firing’ once the mouse button is released).
My problem is that whilst the right mouse button is held down (which can be for an indefinite amount of time as the damage increases with time), the charging animation plays, but the player can still move the character by pressing W etc. So the character is effectively sliding across the floor whilst this stationary pose animation is in progress, and it looks very dumb.
I’ll include all the code for the charging attack, and then two attempts I’ve tried to disable character movement. I have no idea why it’s not working because these are the two solutions suggested by most forums/videos.
And the fixes I’ve tried:
I’ve also tried with a branch node, but still no luck:
Thanks for any help!