Third Week
Project Introduction
This week's goal is to rebuild the Unity Virtual Camera's properties. I started by building the properties of Follow System. Then I created different versions of Follow Camera which includes: Third Person Follow and Hard Lock to Target. To strengthen my math skill, I started to build math library functions for any possible use case.
Body Properties
Body in Unity Cinemachine refers to the virtual camera movement and works with Follow target. To rebuild the cinemachine function, I followed Unity's virtual camera and made a similar interface. I used UProperty meta Specifiers to make the detail panel change as the user chooses different body properties.
Different Follow Camera
In Cinemachine, there are six different follow cameras, this week I rebuilt two of them which includes: Third Person Follow and Hard Lock to Target
Hard Lock To Target
This one will lock the camera to the center of the player, it can be useful for the first-person game. The Damping property indicates how many times the camera will move to the next position.
Third Person Follow
Third Person Follow camera which keeps the camera at a constant position and distance relative to the following target. The rig and the camera position are defined by three pivot points (Origin, Shoulder, and Hand). To make this work, I first set the camera to the target location, then add shoulder offset and arm length to world offset. The Property - camera side is a number between 0 and 1, 0 will be the current position, 0.5 will be the center of the target, and 1 will be the other side.
Viewport Update
To make user easier to use the variables, the camera location will calculate in OnConstruction Function. To make the code more efficient, I set the Camera location minus the target location as a variable, and in the Tick function, I use that variable to calculate the camera location.
Math Formula
Unreal already have lots of built-in math formula, but to learn more, I decide to start building a math formula class. The class support simple vector calculation and the Yaw rotate function. I hope eventually all the math functions I need will come from my own Math Formula Library.
At the beginning of this week, I'm trying to find a way to customize the detail panel. And I spent half of the time learning how to create the Editor Module. However, after more research, I figure out I can use UProperty to make the same outcome and which is much simpler.
As I started to build the virtual camera, it was way more complicated than I thought. I couldn't follow my schedule as I mentioned in the proposal
Solution: Cancel the C# learning goal spend more time completing the cinemachine rebuild process and learned more about Unreal custom editor.
Next Week Plan
Next week I planned to complete the rest of the 4 kinds of the following cameras which includes Trasposer, Framing Transposer, Orbital Transposer and Tracked Dolly. It will involve the research of creating a dead zone and soft zone for the camera, creating orbiting target camera, and using the path to move the camera.
Aryna Ou