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
-
objectStrategyCamera
- 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
heightControllerFunc<DoubleVector3, double>This delegate is called to control the minimum height of the strategy camera based on its 2D coordinates.
Properties
MaxPitch
[FloatRange(0, 90)]
public float MaxPitch { get; set; }
Property Value
MinPitch
[FloatRange(0, 90)]
public float MinPitch { get; set; }
Property Value
MovementSensitivity
Controls the sensitivity of movement.
[FloatRange(0, 100)]
public double MovementSensitivity { get; set; }
Property Value
Rotation
The clockwise horizontal rotation around the target in degrees.
public double Rotation { get; set; }
Property Value
Target
The position the camera is looking at.
public override DoubleVector3 Target { get; set; }
Property Value
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
translationDoubleVector3Movement in screen units. X = pan right, Y = pan up, Z = move forward
rotationDoubleVector3Rotation 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()