Top Down Strafe to Mouse Location
I'm brand new to UE4, and reading up on tutorials and the likes to help myself learn the blueprint system.
What I am trying to achieve is a top down WASD movement system, but with the mouse used as an aiming point.
So far I've got the rotation sorted out, it points to where the mouse is, and W & S goes forward and back to where the mouse is pointing on the screen.
The problem I'm having now is with strafing.
I can get it to strafe on the Y axis with no problem... but say if the character is moving forward on the Y axis, and I press "A" to strafe left... he will just continue going in that direction.
So ultimately I need help with strafing, so that the character will move side to side based on where the location of the mouse is on the screen.
Here is what I have so far (sorry for the mess, really I'm new to this).
Appreciate the help!
asked Mar 06 '16 at 08:56 AM in Blueprint Scripting
If you have a valid forward vector then getting the right/strafe vector is pretty simple. Try just using a "Rotate Vector" node based on your forward vector.
answered Mar 07 '16 at 05:15 PM
You have to set a proper value for "World Direction" on the RightMovement. This gonna be the vector you are using for the forward input, just rotated 90 degrees to the right.
answered Mar 06 '16 at 07:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here