-- View scripts 
-- Copyright (C) 2004, Eagle Dynamics.
DisableCombatViews				= false -- F5 & Ctrl-F5
ExternalObjectsLockDistance 	= 10000.0
ShowTargetInfo 					= false
CameraTerrainRestriction 		= true
hAngleCustomDefault 			=  0.0
vAngleCustomDefault 			= -8.0
vAngleCustomMin    				= -90.0
vAngleCustomMax    				= 90.0

UseGreenieBoardLandingDataHistory = true	-- For Carrier Air Wing Briefing Room
UseKillBoardDataHistory = true

--reformatted per-unit data to be mod system friendly 
--this file is no longer should be edited for adding new flyable aircraft , DCS automatically check core database (i.e. where you define your aircraft in aircraft table just define ViewSettings and SnapViews tables)

function default_fighter_player(t)
	local res = { 
		CameraViewAngleLimits  = {20.000000,140.000000},
		CameraAngleRestriction = {false	   ,90.000000,0.500000},
		EyePoint               = {0.05     ,0.000000 ,0.000000},
		limits_6DOF            = {x = {-0.050000,0.4500000},y ={-0.300000,0.100000},z = {-0.220000,0.220000},roll = 90.000000},
		Allow360rotation	   = false,
		CameraAngleLimits      = {200,-80.000000,110.000000},
		ShoulderSize 		   = 0.2,  -- move body when azimuth value more then 90 degrees
	}
	if t then 
		for i,o in pairs(t) do
			res[i] = o
		end
	end
	return res
end

ViewSettings = {
	Cockpit = {
	[1] = default_fighter_player({CockpitLocalPoint      = {3.406000,0.466000,0.000000}}),-- player slot 1
	}, -- Cockpit 
	Chase = {
		LocalPoint      = {-0.294000,2.866000,0.000000},
		AnglesDefault   = {180.000000,-8.000000},
	}, -- Chase 
	Arcade = {
		LocalPoint      = {-16.594000,5.466000,0.000000},
		AnglesDefault   = {0.000000,-8.000000},
	}, -- Arcade 
}



SnapViews = {
[1] = {-- player slot 1
	[1] = {
		viewAngle = 70.611748,--FOV
		hAngle	 = -1.240272,
		vAngle	 = 0.850250,
		x_trans	 = 0.164295,
		y_trans	 = -0.074373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[2] = {
		viewAngle = 32.704346,--FOV
		hAngle	 = 25.696522,
		vAngle	 = -34.778103,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,

	},

	[3] = {
		viewAngle = 32.704346,--FOV
		hAngle	 = 0.000000,
		vAngle	 = -47.845268,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[4] = {
		viewAngle = 36.106045,--FOV
		hAngle	 = -28.878576,
		vAngle	 = -36.780628,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[5] = {
		viewAngle = 88.727844,--FOV
		hAngle	 = 128.508865,
		vAngle	 = 13.131046,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[6] = {
		viewAngle = 41.928593,--FOV
		hAngle	 = 0.000000,
		vAngle	 = -4.630446,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[7] = {
		viewAngle = 88.727844,--FOV
		hAngle	 = -128.508865,
		vAngle	 = 13.131046,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[8] = {
		viewAngle = 88.727844,--FOV
		hAngle	 = 81.648369,
		vAngle	 = -9.500000,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[9] = {
		viewAngle = 88.727844,--FOV
		hAngle	 = 0.000000,
		vAngle	 = 34.180634,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[10] = {
		viewAngle = 88.727844,--FOV
		hAngle	 = -80.997551,
		vAngle	 = -9.500000,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

	[11] = {--look at left  mirror
		viewAngle = 56.032040,--FOV
		hAngle	 = 14.803060,
		vAngle	 = 3.332499,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,

	},

	[12] = {--look at right mirror
		viewAngle = 56.032040,--FOV
		hAngle	 = -14.414484,
		vAngle	 = 3.332499,
		x_trans	 = 0.264295,
		y_trans	 = -0.064373,
		z_trans	 = 0.000000,
		rollAngle = 0.000000,

	},

	[13] = {--default view
		viewAngle = 90.000000,-- FOV when spawning in pit (auto dezoom) (FOV arrivée Cockpit (une fois dézoom fait par DCS) ) 95
		hAngle	 = 0.000000,
		vAngle	 = -18.200000, -- horizontal cockpit view (Vue horizontale cockpit) -10
		x_trans	 = 0,
		y_trans	 = 0,  -- base height of the cockpit view (Hauteur de base de la vue cockpit)
		z_trans	 = 0.000000,
		rollAngle = 0.000000,
	},

},

}
