VISION
What is this?
This tool is created with ImGUI and is used for easy usage and control of cameras in our custom engine
For many of my personal games created using The Unity Engine, I’ve used Cinemachine as my main tool for camera control. Cinemachine is a tool coming prepacked with tools such as camera transitions, look-at, and follow movement.
For our seventh game project at The Game Assembly, I knew we were going to create a third-person game that has a relatively complex camera. This inspired me to create a system we in our group could use to control the camera with camera collision, aiming, and such.
Why did i create this?
The interface consists of a hierarchy to the left that shows all camera entities in the scene that has the “VisionCameraComponent”. On the right you have the properties panel where you can set settings on how you’d like the camera to behave using a bunch of different settings.
This tool is designed to be connected with other windows in our engine like the Game View that show the view from a camera in the scene. With the hierarchy, you can select the camera you want to edit and that will automatically switch the Game View to render from the selected camera which helps a lot when setting up the camera.
The tool comes prepacked with some Camera Types,
Free Cam
The default setting for normal control using the settings.
Third Person
Automatically add arc ball motion moved using mouse movement.
First Person
Same as third person except it doesn’t arc ball around a target.
Interface
The most used feature so far with this tool is its smart way of handling camera transitions. My first approach was to blend the currently active camera with the camera you want to switch to by moving the active camera to the target camera. This became a problem if new transitions were being called while a transition already was happening and I had to store a lot of start positions etc…
My solution was to initialize a “Transition Camera” when play mode starts. This is a camera only controlled by the system and is switched to when blending. When a camera switch is started, the transition camera copies all properties of the active camera and blends into the target camera using some options such as.
Blend Type
Ease in, our or both
Blend Time
The time it takes for the switch
Additive Blend
Uses the active camera’s current position to blend from instead of a start position for smoother transitions when cameras are in motion.