Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
CinemachineVirtualCamera Struct Reference

Addon component that represents a virtual camera. Managed by CinemachineSystem to calculate tracking offsets, damping, and priority-blending. More...

#include <CinemachineComponent.hpp>

Public Attributes

Entity followTarget = Entity()
 Target entity handle to follow.
Entity lookAtTarget = Entity()
 Target entity handle to look at.
std::string followTargetName
 Name of follow target entity for serialization lookup.
std::string lookAtTargetName
 Name of look-at target entity for serialization lookup.
std::string lockToBone = "Head"
 Skeletal bone name to lock camera to in FirstPerson mode.
CinemachineMode mode = CinemachineMode::ThirdPersonFollow
 Active camera tracking mode.
bool mouseOrbit = true
 Enable mouse orbit control around follow target.
bool mouseLook = true
 Enable free mouse look orientation.
float orbitSensitivity = 0.1f
 Sensitivity multiplier for mouse orbit input.
float orbitYaw = 0.0f
 Current orbit yaw angle in degrees.
float orbitPitch = 0.0f
 Current orbit pitch angle in degrees.
float cameraYaw = 0.0f
 Current camera yaw angle in degrees.
float cameraPitch = 0.0f
 Current camera pitch angle in degrees.
glm::vec3 followOffset = glm::vec3(0.0f, 4.0f, 8.0f)
 3D position offset relative to target.
float followDamping = 2.0f
 Damping rate for smooth position tracking (higher = slower, 0.0f = instant).
float lookAtDamping = 1.0f
 Damping rate for smooth rotation tracking.
float fov = 45.0f
 Field of view in degrees.
int priority = 10
 Priority rank used to pick active virtual camera (higher priority wins).
bool active = true
 Master active flag for this virtual camera.
glm::vec3 currentPosition = glm::vec3(0.0f)
 Cached world-space position for smooth frame interpolation.
glm::vec3 currentRotationEuler = glm::vec3(0.0f)
 Cached Euler rotation angles for smooth frame interpolation.
bool initialized = false
 Flag indicating whether camera initial transform was initialized.

Detailed Description

Addon component that represents a virtual camera. Managed by CinemachineSystem to calculate tracking offsets, damping, and priority-blending.

Member Data Documentation

◆ active

bool CinemachineVirtualCamera::active = true

Master active flag for this virtual camera.

◆ cameraPitch

float CinemachineVirtualCamera::cameraPitch = 0.0f

Current camera pitch angle in degrees.

◆ cameraYaw

float CinemachineVirtualCamera::cameraYaw = 0.0f

Current camera yaw angle in degrees.

◆ currentPosition

glm::vec3 CinemachineVirtualCamera::currentPosition = glm::vec3(0.0f)

Cached world-space position for smooth frame interpolation.

◆ currentRotationEuler

glm::vec3 CinemachineVirtualCamera::currentRotationEuler = glm::vec3(0.0f)

Cached Euler rotation angles for smooth frame interpolation.

◆ followDamping

float CinemachineVirtualCamera::followDamping = 2.0f

Damping rate for smooth position tracking (higher = slower, 0.0f = instant).

◆ followOffset

glm::vec3 CinemachineVirtualCamera::followOffset = glm::vec3(0.0f, 4.0f, 8.0f)

3D position offset relative to target.

◆ followTarget

Entity CinemachineVirtualCamera::followTarget = Entity()

Target entity handle to follow.

◆ followTargetName

std::string CinemachineVirtualCamera::followTargetName

Name of follow target entity for serialization lookup.

◆ fov

float CinemachineVirtualCamera::fov = 45.0f

Field of view in degrees.

◆ initialized

bool CinemachineVirtualCamera::initialized = false

Flag indicating whether camera initial transform was initialized.

◆ lockToBone

std::string CinemachineVirtualCamera::lockToBone = "Head"

Skeletal bone name to lock camera to in FirstPerson mode.

◆ lookAtDamping

float CinemachineVirtualCamera::lookAtDamping = 1.0f

Damping rate for smooth rotation tracking.

◆ lookAtTarget

Entity CinemachineVirtualCamera::lookAtTarget = Entity()

Target entity handle to look at.

◆ lookAtTargetName

std::string CinemachineVirtualCamera::lookAtTargetName

Name of look-at target entity for serialization lookup.

◆ mode

CinemachineMode CinemachineVirtualCamera::mode = CinemachineMode::ThirdPersonFollow

Active camera tracking mode.

◆ mouseLook

bool CinemachineVirtualCamera::mouseLook = true

Enable free mouse look orientation.

◆ mouseOrbit

bool CinemachineVirtualCamera::mouseOrbit = true

Enable mouse orbit control around follow target.

◆ orbitPitch

float CinemachineVirtualCamera::orbitPitch = 0.0f

Current orbit pitch angle in degrees.

◆ orbitSensitivity

float CinemachineVirtualCamera::orbitSensitivity = 0.1f

Sensitivity multiplier for mouse orbit input.

◆ orbitYaw

float CinemachineVirtualCamera::orbitYaw = 0.0f

Current orbit yaw angle in degrees.

◆ priority

int CinemachineVirtualCamera::priority = 10

Priority rank used to pick active virtual camera (higher priority wins).


The documentation for this struct was generated from the following file: