The Camera
My largest task for this project was the camera and early in development I were given reference material for features we needed. This includes certain standard platformer camera features such as height preservation on jumps, swivelling on lateral movement and FOV change based on velocity. Additionally I added camera snapping and distance based on pitch to that list.
A goal I set early on was to have most of the functionality in C++ to prevent bloated and messy blueprint files. I accomplished this fairly well with most Blueprint implementation being timelines that simply called on my methods. The one large exception being the height preservation that I could not move over in time (See below).
Originally I thought that adding the features to the default unreal 3rd person camera would be enough but after the first prototype we had problems with the collision adjustment being overly sensitive and I came to the conclusion that custom collision was necessary.
My solution was to replace the default springarm logic with one that checks if the top, middle or bottom of the player is visible. This logic prevents partial blocking geometry from adjusting distance. Additionally I do a sphere check around the new location so I can move out of any geometry and avoid clipping.
To improve position smoothing I transform the location into relative space to interpolate the distance at a different speed. This speed also depends on the direction of the change.

