Sixth Week

Project Introduction

This week I finish the last aiming camera and all the camera properties and fix some bugs when the user tried to combine two different cameras.

Group Target

This camera can assign a group of objects, the camera will aim at the center of the group.

To make this works, I create my own bounding box by calculating the Max and Min position among all the target. And use that box and field of view to calculate the distance of the camera.

Weight of Object

In the group target, the user can assign different weights to the following target. The bigger the weight, the target will be closer to the center of the viewport.

I made by calculating the center using the weight of all the targets. And take the bigger distance of bounding box max & min point to the center. Use the longer one to calculate the distance of the camera.

Radius of object

the radius will affect the bounding box for each individual object.

I use this radius variable to affect the max and min position of the bounding box. The bigger the radius is, leave more space around the object.

Math Formula

This week, I keep building my math formula library. I remake the Min and Max function for float, and the interp function for float, vector, and rotator.

Obstacle

This week I found out that sometimes when I combine the look at camera and follow camera. The two update functions will conflict if both functions rotate the object, which will cause an unintentional performance. To make the combination work, I need to do more conditional checks.

Next Week Plan

I finally finish the Body and Aim properties. Next week, I'm going to focus on the last piece of virtual camera - camera noise and refactoring the code by implementing type erasure for branchless programming.