Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::Camera Struct Reference

#include <CameraInput.h>

Public Member Functions

AZ::Transform View () const
 View camera transform (V in model-view-projection matrix (MVP)).
 
AZ::Transform Transform () const
 World camera transform.
 
AZ::Matrix3x3 Rotation () const
 World rotation.
 
AZ::Vector3 Translation () const
 World translation.
 

Public Attributes

AZ::Vector3 m_pivot = AZ::Vector3::CreateZero()
 Pivot point to rotate about (modified in world space).
 
AZ::Vector3 m_offset = AZ::Vector3::CreateZero()
 Offset relative to pivot (modified in camera space).
 
float m_yaw = 0.0f
 Yaw rotation of camera (stored in radians) usually clamped to 0-360 degrees (0-2Pi radians).
 
float m_pitch = 0.0f
 Pitch rotation of the camera (stored in radians) usually clamped to +/-90 degrees (-Pi/2 - Pi/2 radians).
 

Detailed Description

A simple camera representation using spherical coordinates as input (pitch, yaw, pivot and offset). The camera's transform and view can be obtained through accessor functions that use the internal spherical coordinates to calculate the position and orientation.

Note
Modifying m_pivot directly and leaving m_offset as zero will produce a free look camera effect, giving m_offset a value (e.g. in negative Y only) will produce an orbit camera effect, modifying X and Z of m_offset will further alter the camera translation in relation to m_pivot so it appears off center.

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