Top down Movement Character not working as intended

Im trying to set up a top down character project.

The character is controlled via a playercontroller that handles all input.

The camera is rotated in a iso/top down way that it looks down on the character.

The character should move with WASD. If i for example press W the character should move forward based on the cameras direction while rotating into that direction so he faces it. Basically W = towards the top of the screen, D = towards the right side of the screen. My character however just runs in circles on the same location.

Maybe someone has a way of how to achieve that.

I assume you’re using the Actor Forward/Right Vector to move the player.

You should instead grab the control rotation and from there on get the Right / Forward Vector.

The reason being ,the control rotation is the actual rotation that you’re looking at.
Whereas the Actor Forward/Right Vector is just a vector representing the direction the character itself is rotated at.

E.g.

1 Like

Now atleast he keeps walking a straight line, the problem is he keeps moving into the red arrow direction if i press W, but i want him to go the green arrow direction, do i have to do a tick function and update the control rotation constantly? for example i can rotate the camera view with MMB + Mouse X.

Make sure that your camera / spring arm uses control rotation and your camera inputs call “AddControllerPitchInput/AddControllerYawInput” (if you’re doing this inside the player controller, the functions are called “AddPitchInput/AddYawInput”)

It’s important that you inject your camera inputs into the control rotation, otherwise your pawn won’t move into the direction the camera is facing.