Fifth Week
Project Introduction
My goal for this week is to finish the last Follow camera -- Dolly Tracked and start to build the aiming camera. Since this week I'm more comfortable with the vector logic, I finished the Dolly Tracked camera and made four kinds of the aiming camera which include: Composer, Hard Look At, POV, and Same as Follow Target.
Dolly Tracked
It's a camera that supports the User to assign a path to the camera. I used the Spline to reproduce it in Unreal.
First, I built a BP_SplineControlled based on a C++ class. It supports all the property it needed. Users can use this Blueprint to design the path and assign it to the virtual camera. They can also assign the path start position, the time it takes and camera up which can be assigned to Path or Follow Target.
Aiming Camera
Aiming Camera has 5 variants, this week, I rebuilt four of them. The Aiming system is much simpler than the Follow system.
Hard Look At
This Aiming Camera will rotate the camera as the target moves.
I made this by getting the target forward and right vector and making the rotation from it.
Same As Follow Target
This Amimg Camera will rotate as the target's rotation and the user can set the damping for the camera.
To make this camera, I simply set the actor's rotation to the target's rotation.
Composer Camera
This Aiming Camera can set the dead zone and soft zone of the camera. The camera will only move when the target is out of the dead zone. The logic of the rotation is the same as the hard look at camera, but it also needs the zone data.
To make this camera, I reused the variable and function for the following Camera - framing composer. Updated the Set zone function and make the Dead zone and Soft Zone array from 2 to 4, so the same function will set both follow zone and aim zone.
POV Camera
The POV Camera will not follow any target, instead, the camera will rotate via the user's mouse axis. Users can also set the limit range of the camera. If we combine this camera with the following camera - hard look at target. it can be used as a camera for first-person games.
I made this camera by using the binding input, which I learned last week, with the Move vertical and Move horizontal function.
This week is much smoother then previous weeks, since most of the aiming function is similar to the follow function. So it's much easier to set up. However, I found out that as the project growth, the properties and function is scattered in the header file and not organized. Moreover, as I mentioned last week, the code using lots of if-switchment which still not optimized.
Next Week Plan
Luckily, this week I can build most of the Aiming Camera. Next week I'm going to focus on the last one -- Group Composer which will follow a group of target users assigned. The importance of each target will base on the assigned weight. It's not an easy one, but I will try to finish it soon and use the extra time to clean the code and figure out how to make it more efficient.
Aryna Ou