Complete the code to set the camera to orthographic mode.
Camera.main.orthographic = [1];Setting Camera.main.orthographic to true switches the camera to 2D orthographic mode.
Complete the code to set the orthographic size of the camera to 5.
Camera.main.orthographicSize = [1];The orthographicSize controls the vertical size of the camera view in orthographic mode. Setting it to 5 is common for 2D setups.
Fix the error in the code to move the camera to position (0, 0, -10).
Camera.main.transform.position = new Vector3([1], 0, -10);
The camera's x position should be 0 to center it horizontally. The z position is already set to -10 to look at the scene.
Fill both blanks to smoothly follow the player on the x and y axes.
Vector3 targetPosition = new Vector3(player.transform.position[1], player.transform.position[2], -10);
To follow the player horizontally and vertically, use .x and .y to get the player's position on those axes.
Fill all three blanks to clamp the camera's x and y position within limits and keep z at -10.
float clampedX = Mathf.Clamp(player.transform.position[1], [2], [3]); float clampedY = Mathf.Clamp(player.transform.position.y, -5, 5); Camera.main.transform.position = new Vector3(clampedX, clampedY, -10);
Clamp the player's x position between -3 and 3 using Mathf.Clamp and access the x coordinate with .x. The y position is clamped separately.