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.
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.