store right vector on the camera
parent
d5d0a38ff1
commit
7964d8a171
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue