Why doesn't my character turn when moving
I have set up tank controls (w moves forward, s moves backwards and a and d turn left and right). However when I press either w or s together with a or d the character goes straight. In other words when I run forwards of backwards the character doesn't turn. But when I press a or d when stationary my turning works fine.
I've attached screenshot of my blueprint. I've paintbrushed some uninteresting parts to make it easier to read: https://i.imgur.com/Mln0dCD.png
Basically I have set up an switch_on_int so I can have different turning speed for left and right. The first branches can be ignored, they don't do anything.
If your character uses a movement component, you have to use its functions to control the movement. The functions are Add Movement Input and Add Controller Yaw Input for the linear movement and rotations respectively.
Your rotation uses SetActorRotation though, which may conflict with how the movement component handles it. You should use Add Controller Yaw Input instead.
Make also sure you check Use Controller Rotation Yaw in the Details panel of your character blueprint.
answered Jan 13 '18 at 10:51 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here