Mouse Aiming and Player Movement

I believe I may have missed a step or messed up somewhere along the way while following this course because my player characters movement is not independent of its aiming. When I press W my character runs in the direction of the mouse aiming.

Note: I am using UE 5.2.

Does anyone have any ideas how I might be able to fix this?

Can you show us your code for character movement? That’ll help us get a sense of where you’re at so we can better identify the issue.

Sure here is my blueprint code for the Marine Player Character movement.



Ah, I see you’re using UE5 for the course. The movement for the Marine is setup to use the ForwardVector and RightVector, which allows the Actor to move in relation to its rotation. Sometimes you want this, but for this game we don’t. Thankfully only a couple small changes need to be made.

First, disconnect the GetActorForwardVector node and GetActorRightVector node from their respect AddMovementInput nodes. Then, either set the X value for World Direction to 1.0 or the Y value for World Direction to 1.0. See below

Which movement input node gets a 1.0 in X and a 1.0 in Y is going to depend on how your level and camera are setup.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms