How to make a character to NOT stop moving in direction until I press the opposite button?

Keeping all the additional info that I’ve provided here, but check the very bottom to see the fix that you need to apply


First, check your action values by printing them out to see if they give the expected results.

For reference, here’s the outcome of my first blueprint code:

  • Acceleration default value: 5


If your character doesn’t rotate to the direction of the movement, add this to your code:

  • Mov Direc’s default value is (x = 1, y = 0, z = 0) but depends on your orientation. You can also just set it to be your character’s forward vector after the Event Begin Play node to be safe.
  • Mov Direc should be plugged into the “world direction” pin of the “Add Movement Input” node instead of the character’s forward vector in this case.

And here’s the outcome of the blueprint code that’s adjusted to work with a character that doesn’t orient it’s rotation to the direciton of the movement:


If you still can’t figure it out, create a new project by using the third person template like I did here, and implement my blueprint code there. Maybe you can see what else is different.


Your Fix

Okay found where your poblem is. You need to have these bindings:


Oh and one more thing, if you want the character to keep moving forward until it’s speed drops down to 0, and only then change it’s direction to go backwards, you can simply replace the Action Value Y (though might be different in your case) with this:

(Note that we used the same IA_Move node twice. The one that triggers my blueprint code an the one handles the bindings are not in the same execution chain. So do not replace the Action Value Y with the code above for the acceleration logic. Just replace the Action Value Y pin of the input action node that executes those two Add Movement Input nodes one after another.)

And here’s the outcome of the adjustment:

(The character orients it’s rotation to the movement direction in this demonstration. So do not apply the code which includes the custom movement vector (Mov Direc) in order for this to work)