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
-
objectFirstPersonCamera
- Implements
- Inherited Members
Properties
Pitch
The vertical rotation upwards in degrees.
public double Pitch { get; set; }
Property Value
WorldUp
A unit vector describing the direction considered up in the world.
public DoubleVector3 WorldUp { get; set; }
Property Value
Yaw
The horizontal rotation to the right in degrees.
public double Yaw { get; set; }
Property Value
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()