InputAction not deactivating after release of designated button
So in the picture in the red squared area, you can see I've set up a system for walk run and sprint. I want the walk anim to be toggled and that IS working properly currently.
However, the sprint button (connected to left shift) is working as a toggle as well, even though my intention is to have it be a press-release like most games are for a sprint anim..
Essentially, as long as left shift is held down, the characters speed is set to sprint speed, and when it is released it goes back to run speed.
Based on how this is set up what would be causing this?
By the way found out what this was.
I had checked the shift checkbox next to the drop-down box in Input settings while designating Left Shift as a button.
For some reason that checkbox makes it so when shift is released the system does not register it.
answered Jul 21 '18 at 11:11 PM
Not sure seems like it should work in theory BUT, why bother with the extra branch node and check on movement state? You want EVERY time space is pressed for the player to sprint no matter what...and EVERY time it is released to go back to a "run". So why not code that instead? You are giving the computer more places to create a weird bug. Just go from input action sprint pressed to "set movement state sprint" and on released "set movement state run". Seems like it would do the exact same thing without that intermediate check on current movement state.
Follow this question
Once you sign in you will be able to subscribe for any updates here