How to enable auto run for 2d runner


Hello, I’m currently creating a 2d runner where you can fly (similar to the helicopter game). I’ve added another axis that the player can move up and down, however I’m not sure how to apply auto the auto run so the player always has to move to the right. Any suggestions would be greatly appreciated.

Hi @Snakejoey55,

Its very simple - create a new variable called “AutoRunActive” and use a Branch before your AddMovementInput Node.

If AutoRunActive is TRUE then make the Scale Value of AddMovementInput 1 (instead of plugging in the Axis value).

So in essence, if you are NOT autorunning, you will use the Input Axis value (0-1), but if you ARE autorunning, the value is always 1 (constant movement).

Hope this helps!