Before we give the player any means of moving around, we’ll have to set up the player GameObject and provide them with a way of changing the direction they’re facing. We’ll do that here, implementing our first- and third-person cameras. Both systems will be handled by one script, and the player will be able to press a hotkey to smoothly switch from one to the other.
Coding the first-person camera will be a bit simpler. We position it where the player’s eyes would be, and we rotate it based on changes in the mouse position. Move the mouse left, the camera and the player will ...