store right vector on the camera

mesh_sprite_draw
cosmonaut 2020-12-09 17:47:54 -08:00
parent d5d0a38ff1
commit 7964d8a171
1 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ namespace Kav
public Vector3 Position { get; }
public Vector3 Forward { get; }
public Vector3 Up { get; }
public Vector3 Right { get; }
public float FieldOfView { get; }
public float AspectRatio { get; }
@ -28,6 +29,7 @@ namespace Kav
Position = position;
Forward = forward;
Up = up;
Right = Vector3.Cross(forward, up);
View = Matrix.CreateLookAt(Position, Position + Forward, Up);
FieldOfView = fieldOfView;