Devlog 2: Added the Basic First-Person Controller


This week, I was focused on getting the player to get a first-person controller in the game. The two most important parts of the first-person controller are the player movement and the camera movement. I worked on moving the player and then I worked on getting the camera to move with the player's mouse. I also allowed the player to walk in the direction that the camera is facing to make it easier for players to control the character. I found the player movement easy to add because it was similar to the movement I did for my other games and the camera movement was more difficult to add because I was having trouble with adding the mouse input from Unity's new input system but I managed to solve it.

The next thing I was focusing on was jumping and the player's gravity. I added my own gravity because I want to have more control over the player's gravity. The gravity works by pulling the player down on the Y-axis. The next thing I added was the player's jump. The player will jump when they press the jump button and the game will lunch the player up by a small amount and then the gravity will take over. The next thing I added was the player running. The player will run when the player presses the run button and the game will change the speed of the player. The last thing I did this week was adding in the player's crouching. The crouching works by changing the height of the character controller when the player presses the crouch button.