
I’ve created 2 scripts. One determines the player spawn in relation to the camera and the other is the movement of the camera.The new settings means that the player object has been turned into a prefabricated object that’s part of the game manager script. Instead of being apparent from when the game is loaded, the player will now spawn into the central camera position and be followed by the camera.
In the camera’s script there is a void, which is the camera’s target. This void is filled with the prefabricated game object, which is the player. This means the camera now follows the player… Or at least that’s how I explain it to myself in my head.
As indicated earlier, we can now see that there is not initially any sign of the player until the play button is pressed and the script starts. Once started, the player spawns and can be controlled.