If you’ve played Super Mario 3d World, you’ll know that the camera seems to just ‘get it right’ basically all the time. It’s above when it needs to be, it pivots when it feels right, it generally just gives you the angle that would work best. Framing like that is not automated! It’s designed – well designed. When building a 3d platformer it’s fairly important and probably not something you really thought would matter right off the bat. I certainly didn’t even think about it in terms of implementation. I definitely appreciated how SM3dW seamlessly blended complex areas and framed the space so well, but it wasn’t until a couple of weeks ago when designing levels that I finally realized that it was a very critical feature if you were going to have levels with varying height and large puzzles/obstacle spaces.

So, I made something to handle it.

 

 

It turned out decent, and is easy to design with. It’s essentially just a trigger volume that responds to the Player entering it. There’s a config for Position and Rotation offset in each one and they simply assign themselves to the Camera System when the player arrives. The Camera System already had features for setting the position/rotation offset so it was really simple to just add the Camera Volume in there and include it in the calculation.

I feel like it’s totally useable as is. There’s certainly polish that could be had, and a couple of lingering possible issues I might need to sort out but it basically works sooooo I guess I’m shipping it.