1 min
The way the cameras were setup before was with the TPSCamera class inheriting from the Camera class but now I have done away with that and based the camera class upon the way the unity camera works. The unity camera can act as any type of camera the user wants as the video shows.
The camera system I have implemented now allows the camera to up to 8 types of camera, including a fist person camera, a lerping follow camera, a cinematic camera or a camera that can fly around (although this is only used for debugging and checking the map works). All of these behaviors are stored in the camera class at the moment but if it gets too long I will make it a component based system with each part in a different class (for readability/organizational purposes).
enum class BEHAVIOUR : int
{
BEHIND = 0,
FRONT = 1,
LERP = 2,
FIRST = 3,
INDEPENDENT_FIXED = 4,
INDEPENDENT_LERP = 5,
ORBIT = 6,
CINEMATIC = 7,
DEBUG_CAM = 8,
};
I fixed the issue with the orbit camera, I was calculating the range of the orbit using the delta pos (the distance from the camera to the kart) added onto the kart’s position instead of just delta pos. This is why the orbit stretched and changed because the karts position was changing.
Subscribe to this blog via RSS.
Low level programming dev diary 28
Text based adventure dev diary 6
Level design developer diary 3
Game engine programming dev diary 14
Audio-visual production dev diary 7
Audio-Visual Production: Particle System Mesh Spawning Issues
Posted on 20 Feb 2020Low level programming dev diary (28) Text based adventure dev diary (6) Level design developer diary (3) Post mortem (4) Ex-machina dev diary (11) Game engine programming dev diary (14) Network game dev diary (11) Audio-visual production dev diary (7)