Hi, I have a question: how to stop sprinting backwards in Unreal Engine 5.8?
Hello @Aike_Art ,Welcome to the forums!
To prevent the player from sprinting backwards in 5.8, you can try the following:
Inside the BP_Character, make sure Use Controller Rotation Yaw is enabled.
First, create two Boolean variables called bIsSprinting and bIsMovingBack.

Next, connect bIsSprinting and bIsMovingBack with a NOT node and then into an AND node. This way, the condition will only return true when the player is sprinting and isn’t moving backwards. Connect the output of the AND node to the Pick A pin of a Select Float node.Then set A to your sprint speed and B to your normal walking speed.
Then, connect the Return Value of the Select Float node to Set Max Walk Speed on the Character Movement component.
Finally, inside the Move function, take the Y (Float) value from the movement input, add a Less (<) node, and connect its output to Set bIsMovingBack. This way, whenever the Y value is less than 0, bIsMovingBack will be set to true, indicating that the character is moving backwards and automatically switching the movement speed back to the normal walking speed.
If you also want to prevent the player from sprinting while moving sideways, simply create another Boolean variable called bIsMovingSide. Connect it to a NOT node and then to the same AND node we created earlier.
Then, inside the Move function, take the X (Float) movement value, add a Not Equal (!=) node, and connect it to the Set node of the bIsMovingSide variable. This way, bIsMovingSide will be true whenever the player is moving sideways, preventing the player from sprinting while moving sideways.
Hope it helps!




