Table of Contents

Class FirstPersonCamera

Namespace
OmegaEngine.Graphics.Cameras
Assembly
OmegaEngine.dll

A camera that allows movement, yaw and pitch, but no roll. Movement in the XY-plane respects the current yaw but ignores the pitch (fixed "Up" vector).

Useful for building first-person or third-person games with ground-based movement.
public sealed class FirstPersonCamera : QuaternionCamera, IInputReceiver, IPositionable
Inheritance
object
FirstPersonCamera
Implements
Inherited Members

Properties

Pitch

The vertical rotation upwards in degrees.

public double Pitch { get; set; }

Property Value

double

WorldUp

A unit vector describing the direction considered up in the world.

public DoubleVector3 WorldUp { get; set; }

Property Value

DoubleVector3

Yaw

The horizontal rotation to the right in degrees.

public double Yaw { get; set; }

Property Value

double

Methods

Navigate(DoubleVector3, DoubleVector3)

Called when the user changes the view perspective.

public override void Navigate(DoubleVector3 translation = default, DoubleVector3 rotation = default)

Parameters

translation DoubleVector3

Movement in screen units. X = pan right, Y = pan up, Z = move forward

rotation DoubleVector3

Rotation in degrees. X = yaw right, Y = pitch up, Z = roll clockwise

UpdateView()

Update cached versions of View and related matrices; abstract, to be overwritten in subclass.

protected override void UpdateView()