Making a character face the direction of movement in 2D

Hello,

I’m new to UE and recently finished reading up on C++ so thought I’d have a stab at making something, after reading around it seemed like blueprints were the way to go to get a better understanding of what needs to be done before delving into actual code. I’ve been following a guide to make a 2D game from Game from scratch. The movement scheme used was very simple, that it for every key press (or release) the character would move some number of units. This is slow and doesn’t feel good so I tried using input axes instead but now I cannot get the character to face the direction of movement.I looked at the documentation but it all seems to be for 3D. Attached is a picture of the blueprint, I’m guessing I need to split the axis value into two and somehow modify one of the outputs so that it turns the character around. Sadly I am at a loss as to how to do this. Any help would be appreciated, thanks!

The best practice, is by changing the sprite scale using the node “SetRelativeScale3D”. And keep the actor itself as is!

Here is more info about that node:

[Set Relative Scale 3D | Unreal Engine Documentation][1]

57477-screen+shot+2015-09-07+at+9.48.26+am.png

But for more details about 2d character controller, I would recommend checking this quick video about building a 2d character controller:

[Unreal Engine, Making "Braid" P4 - Player Controller - UE4U.XYZ - YouTube][3]

-m

Thank you for your answer! That video was very helpful and I will use your channel. I was wondering if it was possible to set the rotation directly from the input axis, since if someone pressed right or left instead of a or d would it not work? I tried to use this (below) but he now constantly faces left.

Thanks for your help!

EDIT:I changed the capsule component to the sprite and now he always faces right. Could you please explain what I should be using? I thought that since the capsule component was the parent? It would work on everything below it:

I should’ve just used the template and looked at what was done there, it never occurred to me that was how it was done, thanks for the help.