top of page

DYNAMIC CAMERA SYSTEM

Editor

Genre

Tools

Production Time

5 weeks, 50%

Engine

Catbox

Team Size

Solo

Platform

Windows

My Goal

I want to make a camera system similar to how Unity's Cinemachine works. Making it intuitive to use and easy to make instant or smooth transitions.

Camera Utility functions

I had to make some utility functions for the dynamic cameras to work correctly. The first one is the LookAt function, it takes in a target and then rotates so that it looks straight at that point. The second is the rotate-around object, where the camera will start circling around an object using trigonometry.

bild_2023-03-20_095330239.png
bild_2023-03-20_102332221.png
Camera Transition

We can use trigger boxes to make camera transitions. In this example when you enter the trigger box the player camera transitions to a cinematic camera and then has a delay of 7 seconds before going back to the player camera.

Camera Smooth Transition

The dynamic camera system supports transitioning smoothly, this is done by creating a temporary camera that lerps between position, FoV, and rotation. You can change the speed and delay of the transition.

UserExperience.jpg
User Experience

I wanted to make the system easy to use without needing programming experience. So I made the cameras and trigger boxes have a serialized field where all the cameras are stored using a camera controller and id system. This makes it very easy to find and connect cameras to each other. Using this system you can make a functional camera sequence in about 5 minutes.

Debug Drawing

I added debug lines to visualize how the cameras move and transition. This is very helpful when using cameras interconnected in complicated ways. 

Camera Curves

I created camera curves using a quadratic Bezier curve formula to interpolate between four points. I also added this functionality for the debug drawer for easier visualization. This in combination with the look at target means you can make cinematics where you spin around targets while looking inwards.

Conclusion

This project was a huge learning experience for me, I learned not only about interpolating and smoothly transitioning between positions, rotations, and fields of views but also about debug rendering.

I had tons of fun developing and refactoring how the camera controller actually utilizes the engine's functionality to both transition and keep track of all the cameras to fit not only the developer's needs but also the users.

bottom of page