Character wont turn

I have a problem, my character doesnt turn… I can move, but the character always faces the same direction.

Engine input:

104061-engine-input.png

Movement:

I would appreciate any help :slight_smile:

I have allready unchecked the box, i still am not able to rotate. Im really new to unreal engine 4, so im not sure. What am i exactly supposed to do with AddControllerPitchInput and AddControllerYawInput?

Hey DasBesteBruno-

Can you explain what you mean by your character doesn’t turn? Are your screenshots from the third person template project? If so there should also be a section shown as Mouse Input in the character blueprint that controls camera movement

104187-mouseinputnodes.png

104188-mouseinput.png

With this set you should be able to use the mouse to rotate around the character.

I am trying to make controlls in a topdown perspective. I am doing a 2D Topdown, so I can use my own sprites… I tried adding the mouse but it doesnt work… I think its because mouse x works in 3 dimensions…

Are you attempting to get the character to face the direction of the mouse, then? If so the following should help give an idea of how to get your character to face the mouse as the mouse moves around the screen. This worked for me when setup inside the character blueprint for the top down template character.

1 Like

Thank you, it really worked.
But now I have a new probleme, the sprite is rotating in the Y axis/direction (2d sprites).

I would have to see your setup to know what’s happening for certain, but one thing you can try would be to lock the rotation axis of the actor so that it is prevented from rotating in the Y direction.

where do I exactly block the rotation for a axis?

Which axis is your character oriented on? If they are not oriented along the X axis, please try rotating the character in your blueprint. If possible, please also include a screenshot of your rotation / movement setup in the graph of your blueprint to help me see what you’re character is doing exactly.

So the charcacter flips like a coin (the character is a really eearly design, just so I have something to work with…) :

/storage/temp/104529-screenshot+(2).png

So the Graphs:

and a picture of the blueprin viewport:

Your blueprint for your tick function doesn’t quite match the setup I was using. If you right click on the Return Value for the Look at Rotation node as well as the SetActorRoatation node, you should see an option for “Split Struct Pin”. If you select this option for both nodes, you can wire specifically the Rotation.Z (Yaw) so that X & Y (Roll & Pitch respectively) are unaffected.

Thanks alot for your help :slight_smile:
It worked…

Thank you so much for the help