Hi, I want to know how to make my character sprints only forward. The problem now is when I use sprint it will sprint left, right and back. Here is my bluprint:
HmmâŚjust to learn a bit more about your goals:
Is the character intended to always be sprinting if they are moving forward? Or is there a ânormal speedâ option and then they press a button to sprint (but only forward and not other directions)?
you see what you are doing on w being pressed? do that on input action sprint too, but also, set a bool that overrides what i assume you have for âleft pressedâ âright pressedâ âback pressedâ âforwards pressedâ etc.
use branch node to avoid doing the settings when this value is true, and lets call it bIsSprinting
then enable bIsSprinting on pressed, and disable it on released, as well as doing the âforward pressedâ changes that the w key handler is already doing
Thanks for the replies guys, I found the solution for it and itâs exactly what I want it to do. Hereâs the blueprint for those who are finding the solution as well.
Hey!
I know itâs to late, but I had the same question and I just find a solution!
No strange bool, just an AND that detected if The command for sprinting (Pressed = Is A) and the walk forward (Axis >= 1) are pressed in the same time.