Summary
So I assisted Gage with Shadow Mapping and enhanced the camera to avoid entering unwanted spaces such as the villager's homes. I took on the support role during the first portion of that week while I implemented the Camera collision.
I already knew Render to Texture (Shadow Mapping Research)
As I was helping out on this task, I was able to relay my knowledge on basic Render to texture techniques. Essentially giving Gage a boost into understanding what aspects he needed that was not as clearly understood from just the Shadow Mapping articles we had begun researching. Though I was not as involved in the final aspect of the actual feature, I was able to give the first step. In the Shadow Mapping blog post, Gage goes into enough detail to understand it, so I won't just repeat the same thing.
Camera Collision
At first, I was unsure how I wanted the camera to move to avoid entering unintended sections of the game such as the villager's homes or towers. It was either we zoomed closer to the Golem itself or zoom out. I decided to go with zoom out as the camera by default was pretty close to the Golem. However, I came into contact with another problem, the camera had no functionality to have colliders or act as a game object in general so I rewrote certain sections of our orbiting camera class and was able to give it colliders. There was only one tedious issue, trying to gain the correct world position of the camera and put the collider there, it was a bit of trial and error but I was able to get it done. So whenever the camera collided with a building it would zoom out. I also added the feature of having it gradually returning to its default position over time. The next issue was rather simple, it would zoom out continually if you kept colliding so there was no cap on how far it could go. I clamped the zoom to a reasonable range and if it exceeded I decided to snap it back to its default. I'd say it went rather well and I'm pleased with it.
Moises Carmona
Top comments (0)