How can I get a character to always move forward?

Trying to get character to move forward or on a certain axis

Well since 4.4 you can lock axis of an actor in defaults section of blueprint and then you can simply add a static number to movement input to get character to always move in a certain direction.

You shouldn’t need to lock axis in most cases, though that is an option if appropriate for your game. If you’re using an Actor with CharacterMovement component, this is very easy. In an endless runner type game, all you need to do is use an Add Movement Input node as Erasio mentions and give it a value in desired axis in World Direction. For example, if you want to have your character move at a consistent rate of 1 along X axis, it would look like this:


You can give it a variable and feed that in to make it easier to tweak, and if you want to increase speed you can adjust variable over tick and feed that in.

1 Like

If someone have same problem as me, so can’t movement character forward when camera is looking down like that:

then just remove Pitch node like here:

And that it!

thank you sir