Character direction

My game is a top down game and the characters movement and facing direction is determined by WASD, the character i have will move and face in that direction like its supposed to but when i stop pressing the direction the character faces as it was in the starting position

For example it faces north on start i press D it faces east i stop pressing D it faces back north

if anyone could tell me what im doing wrong that would be a huge help

Hey @WafflySpider500!

So there’s lots of possibilities of what’s going wrong, would you mind providing screen snips of your movement code? That way we could likely surmise where the issue might be?

this is the code, sorry it would let me post all the screen grabs in one
image

image

image

@WafflySpider500 Okay now we’re cooking with gas!

So in your “Tick” you have your World Rotation being set on the “Tank Tracks”. Grab that, and everything needed for it, and take it off of tick. Put that on your movement code, the “InputAxis Move Right/Left” and “InputAxis Move Forward/Back”. You can put the code here once and plug in the execution line (the triangles) from both of your “Add Movement Input” nodes, merging the lines.

Hope that helps! :slight_smile:

so is this what you mean? cus that didnt change anything

Did you remove it from the “tick” as well?

Because the problem I’m seeing is that when you aren’t pressing a button, it’s setting your World Rotation to the Actor Location +0, so it’s trying to look at itself.

If you’ve removed it from the tick, try setting a check to see if Velocity >0, then off true, set world rotation (before the set, after “Add Movement Input”).