How Do I Move the Player Character on the Z Axis On Button Press?

Hey there,

I’m making a side scrolling shooter (not a platformer), and i want to make the character move vertically when the up or down key is pressed.

I’ve tried doing it by “set speed” - this makes the actor move upward from the start of the game, and by “set actor location” - this appears to not work at all.

I’m not great at blueprints but I hope someone can help.

You must first change its movement mode to flying mode from its movement component then you can use add movement input node to move it up and down.

set an input key from project settings then use its event to add movement input. for example W =1.0 and S= -1.0

Thanks for the help. At the moment, it starts moving down as soon as the game starts, and continues that way.

The “input axis move down” event is the down-arrow or “S” key being pressed, in the image below.

you need to plug axis value in scale value.