It's my second week working on this project, and It's not a decision I regret. I have been making a lot of progress with the time I have available, although I must reiterate that the next three weeks will not be enough time to make a fully fleshed out game.
I spent nearly the entire day today working to overhaul the camera movement system to suit my game. The goal was to have it function like an RTS (real time strategy) game camera. This entails an overhead camera, that allows you to pan, rotate, and zoom around the map. I made very good progress, but the system still needs some work.
Currently, the user can pan around the map using the WASD keys on the keyboard, or by putting the mouse near the borders of the screen. I also added the ability to use the scroll wheel on the mouse to zoom in and out. When the user gets closer to the ground, the angle flattens out. The further the user gets from the ground, the steeper the overhead angle of the camera is. This is a range between 10 and 80 degrees relative to the ground. Furthermore, I added camera location constraints, meaning the player can't zoom or pan too close or far away from the map. Finally, the user can rotate the camera left and right using the Q and E keys. I made a small video showing off my progress below.
The rotation controls are still in development. I would like camera rotation to be achieved by holding down and dragging the right mouse button. In addition, I want the camera to be able to "orbit" around a point when this happens, as opposed to simply turning the camera in place. This will require me to create a system to dynamically create fixed points to orbit around with smart use of raycasts, or straight lines drawn from one point to another that allow the programmer to gather information (these are also used to place the towers down, among other things). For reference, please peruse my professional drawing:
Achieving good results today has been a challenge, with hours spent frustratingly assembling and debugging code, followed by the sense of victory when I solved the bugs. Creating fluid camera controls require extensive use of three-dimensional vectors, transformations, euler angles, and quaternions; as well as solid knowledge of the included functions and libraries available in Unity. As such, I spent a good amount of time today browsing forums and watching youtube tutorials to find the best ways to accomplish this task.
Overall, today has been a very productive today. Tomorrow I will continue working on the camera system.
0 Comments
Leave a Reply. |
|