Tuesday, December 17, 2013
Week 1 Day 2 - Settings, Input, and Telescopes
Since the last post, we have added all the input controls that we think we will need. We have also created two new scripts to handle player settings, and game settings. Player settings include things like camera sensitivity and camera inversion. Game settings include everything else, from movement speed to jump height.
We spent the vast majority of the evening working on the telescope camera. We decided, rather than moving the main camera in front of the character to zoom in, to just create another camera. However, once we began turning off whichever camera wasn't being used, we ran into a problem. The problem was that once one of the cameras was activated, it jumped to where it was last looking. So, I might be looking one way, but once I jumped into the telescope camera, I was suddenly looking behind me, because that's where the telescope was last pointing.
Our solution was to create a CameraController script, that managed both cameras. Instead of giving one of the camera script's the input information, we gave it to the CameraController to manage it all. The CameraController then gave whichever camera needed to be activated the appropriate information.
Below is a picture of the telescope camera working.
In the bottom right corner you can see what the player would see on screen with the telescope camera. In the main scene, you can see the green capsule (the player) is looking off towards a distant platform. The invisible outlined box extending from the player is the view of everything that can be seen in the telescope. You can see how the bottom of the box skims along the distant platform, but the top misses the platform. This is reflected in the camera preview box in the bottom right.
Tomorrow we plan on working on the distance checker that was mentioned in our previous post, along with some minor polishing of the telescope. After that we plan on brainstorming and setting up a system for abilities, and different types of dashes and jumps. We may implement a few abilities, and after that, networking is our next objective.