Moving First Person Camera with WASD

Hello, I’m very new to learning Unreal Engine 5 and I’m attempting to make a small single level game for my course. A little ambitious, but I was encouraged to experiment as best I could, so I’m doing a top-down stealth game akin to Metal Gear.

I was able to get the switch to FPP from the TDP very easily, but in the FPP mode, I want the player to stop moving and instead use WASD to look around, instead of using the mouse or something. To do this I made a branch with a condition that the TDP camera needs to be active, in order for movement to occur, and, in the false condition, I was expecting to just put the “add Yaw and Pitch controller” functions in, but it still doesn’t move.

I’m not sure what to do and any help would be appreciated :slight_smile:

Hi Wegg, Welcome to the Forums,

I just took a look at this and was able to create the look behavior you’re describing.

This is how I modified the first person template character:

One important distinction is between Axis and ‘Bool’ events. The ‘Add Yaw/Pitch’ nodes like to be fed really small values every frame. If you put a ‘print string’ after the “Triggered” pin on IA_Move you should see it triggering every frame the button is pressed. (Also, if you print the ‘Action Value’ variable you’d see the value of ‘1’ being sent to the nodes every frame)

Hope that helps!

2 Likes

Hello! Thank you for the help, I definitely think I’m heading in the right direction now!

After playing around with it, I found that the blueprint you suggested worked in a first person project template character, but when I recreated it into my top down project template character, I found that it seemed to be rotating the character weirdly in first person mode.

The camera wouldn’t move at all in FPP, but the string showed it was still responding to my inputs. When I came out of FPP to TDP, the character’s control direction seemed to have changed, as the forward input [W] would now head toward somewhere else, depending on where I was attempting to move the camera earlier and now I’m not sure how to fix this.

Again, thank you for the help!!!

Glad to help,

I’m not exactly sure what the problem is, but here is a way to debug the Vector(Direction) that’s being fed into/used by the Input Nodes:

Also you can press F8 to eject from the pawn while playing to fly around freely. (Helps if pawn mesh is blocking the debug arrow)

1 Like