# How to get the direction the player is walking?

So I am making a top-down shooter and the character moves independant of where he shoots.

I need to get the world direction of movement (not aiming) and rotate the character to face that direction. How would I calculate that?

Thanks.

âGet Forward Vectorâ will tell you the direction the player/mesh is facing. Depending on how you âaimâ you either need the actor forward vector, or some component of the actor that is in the direction of movement. Or whatever you use to move the actor you should have the forward vector if you are directly moving the mesh. It kind of doesnât make sense what you are asking. âAimingâ is a rotation of either a gun or the entire body of the player character. If the whole body is rotated then when you âmoveâ the character simply use âfind look at rotationâ between the current forward vector and the movement input vector. If only the gun is rotated then the player is already facing the direction of movement and the aiming is what changes or rotates.

1 Like