Table of Contents

Class StrategyCamera

Namespace
OmegaEngine.Graphics.Cameras
Assembly
OmegaEngine.dll

An overhead camera that allows panning across the map, rotating, and zooming in/out. The pitch angle is automatically adjusted based on the zoom level.

Useful for building RTS games, tactical games, or top-down views.
public class StrategyCamera : ZoomCamera, IInputReceiver, IPositionable
Inheritance
object
StrategyCamera
Implements
Inherited Members

Constructors

StrategyCamera(Func<DoubleVector3, double>)

An overhead camera that allows panning across the map, rotating, and zooming in/out. The pitch angle is automatically adjusted based on the zoom level.

Useful for building RTS games, tactical games, or top-down views.
public StrategyCamera(Func<DoubleVector3, double> heightController)

Parameters

heightController Func<DoubleVector3, double>

This delegate is called to control the minimum height of the strategy camera based on its 2D coordinates.

Properties

MaxPitch

The maximum pitch angle in degrees. Effective when Radius is equal to MaxRadius.

[FloatRange(0, 90)]
public float MaxPitch { get; set; }

Property Value

float

MinPitch

The minimum pitch angle in degrees. Effective when Radius is equal to MinRadius.

[FloatRange(0, 90)]
public float MinPitch { get; set; }

Property Value

float

MovementSensitivity

Controls the sensitivity of movement.

[FloatRange(0, 100)]
public double MovementSensitivity { get; set; }

Property Value

double

Rotation

The clockwise horizontal rotation around the target in degrees.

public double Rotation { get; set; }

Property Value

double

Target

The position the camera is looking at.

public override DoubleVector3 Target { get; set; }

Property Value

DoubleVector3

Exceptions

ArgumentOutOfRangeException

The coordinates lie outside the range of the height-controlling terrain.

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()