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?
asked Apr 21 '19 at 01:37 AM in Blueprint Scripting
"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.
answered Apr 21 '19 at 02:13 AM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here