This week, we learned about how to navigate and control multiple parameters about the camera. For this assignment, I chose to apply PointerLockControls for the camera’s movement and use my midterm project as an environment for the camera to navigate.
For the PointerLockControls, the direction of the camera is controlled by the mouse. The audience can use the arrow keys or “W””S””A””D” on the keyboard to change the camera’s position by moving it to go forward, backward, left or right. On the basis of our in-class code, I made some adjustments and added more variables to control in the GUI controller. If the audience presses the SPACE bar on the keyboard, the camera will jump to a higher position. In the GUI controller, the audience can also control the height of the camera by clicking the “GROUND” button or directly change the height from the “CAMERA_HEIGHT” section. The first button will bring the camera to the original height as it starts. Another function is the “VIEWING_MODE”, where the audience can switch to a camera that is automatically rotating around the center (the island).