I just wanted to make a follow up post as I spent most of today attempting to implement what I did in my other game into Mars Marine, mostly with little success until now. While the above are the blueprints I used in the other game, they do not work in Mars Marine in the same way, likely due to other settings elsewhere in the project. Hopefully I will cover everything here and will not have missed anything.
The first 2 sets of blueprints are in the player’s blueprint. Directional movement is simply this, with control rotation and get vectors removed. Update Player Aim does not need to be on tick. Using this will have the player move in the WASD directions, regardless of which direction they are facing.
Here is my Update Mouse Aim function, within the Update Player Aim function. This will have the player face the direction of the mouse cursor.
This function is what I have in my game mode blueprint coming off the event Begin Play. It is what displays a cursor (crosshairs) onscreen. Having a visual aid is just something I prefer in a game like this.
Notice I have both Set Input Mode Game Only AND Set Input Mode Game And UI. Weirdly enough, having Set Input Mode Game Only first is necessary if you want the crosshairs to display on begin play without having to click the mouse button. For whatever reason, you need to have Set Input Mode Game And UI next, otherwise your left mouse button will not shoot unless you click twice!
Oh, and be sure to uncheck Hide Cursor During Capture.
I hope this helps anyone trying out different ways of controlling the player. I felt like I wanted to update my previous post when I realised those blueprints don’t work as intended for Mars Marine.
Happy Game Deving!