public Camera(Game1 game, Vector3 pos, Vector3 target, Vector3 up) : base(game) { // Build camera view matrix cameraPosition = pos; cameraDirection = target - pos; cameraDirection.Normalize(); cameraUp = up; CreateLookAt(); projection = Matrix.CreatePerspectiveFieldOfView (MathHelper.PiOver4, (float)Game.Window.ClientBounds.Width / (float)Game.Window.ClientBounds.Height, 1, 10000); }
static void Main() { using (var game = new Game1()) game.Run(); }