We were presented an interesting problem with our camera implementation, which was “how should we go about inserting a camera into the scene, when we want it to be attached to the dog, behaving accordingly, but also be detachable and fly over to areas of interest?”.
We elected to keep the camera separate from the dog, allowing it to be very flexible and adaptable to many situations.
We adapted a concept we learned in our Object Oriented Game Development (GAM 372) class, the idea of the Strategy pattern — and wrote it with Unreal blueprints. We wanted to make sure things were kept clean and separate, so we defined a BP camera state, and separated the code into three objects as detailed by our design doc — SFC, SFMC, and FPC. Along with this, we also had separate camera colliders that would trigger all of these states. In the case of SFMC I had to learn how to make a widget appear in-game for a pivot place to be represented such that designers could simply move the widget to wherever they wanted.
What started us on thinking about the Input Manager was seeing the thought of “the dog moving by a short tap.” We thought we would need to define this as an action, and separate the dog from knowing about how that works. Additionally, it is important that the input manager distinguish between gamepad and mouse states for the player. There is definitely a need for the Input Manager, there is a debate to be had about whether focusing on core gameplay instead would be a better use of time, but this gives us an advantage by laying out a groundwork feature that we can detach from the dog altogether.
^The camera colliders
^ an implementation of multilpe camera colliders in a scene.
^The pivot used for SFMC
The different camera volumes
^The debug code for the camera pivot
The camera control states.
^The abstract methods overridden by camera volumes.
^SFMC Overriding the above methods.
^Input manager managing input state
^single tap registration in inputmanager
Singlet tap updating in inputmanager