<!--
This is the Create Custom level file. It sets the size of the level, what environment to use and all objects, such as vox-models, scripts and boundary, used in the level.
Positions are given in meters relative to their parent objects position. In this level no objects are parented and hence positions are in reference to the bottom center of the game world.
Voxbox sizes are given in voxels. One voxel is 0.1 meters on all sides.
This level contains a plain voxbox as indestructible ground and an empty vox file. Open the vox file in MagicaVoxel and create something, then load this level from the Create menu to see your creation in the game.
-->

<!--
The 'version' indicates what version of the editor was used to create the level. Leave it as is to make sure scripts are loaded as expected.
The 'shadowVolume' property sets the area of the game where lighting, and subsequently shadows, are calculated. It is expressed in meters; width, height, length
-->
<scene version="3" shadowVolume="200 100 200">
	<!-- 
	This sets the environment used for the level.
	The 'template' property references a predefined setup of environments. Available environment templates are: 'sunny', 'night', 'sunset', 'sunrise', 'foggy', and 'rain'
	-->
	<environment template="sunset"/>
	<body>
		<!-- 
		A voxbox is a basic box shape. By default it is indestructible.
		The 'pos' property sets the position of the box's top-upper-left corner relative to the bottom center of the game world, in meters. 
		The 'size' property sets the size of the box in voxels as; width, height, and length. 
		-->
		<voxbox pos="-100.0 -0.1 -100.0" size="2000 1 2000"/>
	</body>
	<body>
		<!-- 
		A vox is a voxel model loaded from a vox-file.
		The 'pos' property sets it's position relative to the bottom center of the game world, in meters.
		The 'file' property references the vox-file to be loaded. The 'LEVEL' keyword is a reference to the folder with the same name as the level file i.e., The keyword 'LEVEL' in the basic.xml level file (this file) references the folder named 'basic'.
		-->
		<vox pos="0 0 0" file="LEVEL/custom.vox"/>
	</body>
	<!-- Car -->
	<vehicle name="Mercedes Benz SLS" pos="20.0 1 -13.5" rot="0.0 163.0 0.0" driven="false" sound="sportscar" spring="1.2" damping="1.0" topspeed="120" acceleration="12" strength="8" antispin="0" antiroll="0.1" difflock=".1" steerassist="0.3" friction="1.9">
		<!--
		The 'pos' property of the body in a vehicle sets the center of mass for the vehicle.
		The 'dynamic' prop sets whether the object should be dynamic, i.e., movable, or 'loose', or not.
		-->
		<body pos="-0.05002 0.35 0.25" rot="0.0 0.0 0.0" dynamic="true">
			<!-- 
			A vox is a voxel model loaded from a vox-file.
			The 'pos' property sets it's position relative to its parent, or if it has no parent, the bottom center of the game world, in meters. 
			The 'density' property is a factor to adjust the mass of an object. Should normaly be 1. Lower for lighter floating objects and higher for heavier objects.
			The 'strength' sets how resistant the object is to damage from impacts, such as crashing a car into it.
			The 'file' property references the vox-file to be loaded. The 'LEVEL' keyword is a reference to the folder with the same name as the level file i.e., The keyword 'LEVEL' in the island.xml level file (this file) references the folder named 'island'.
			The 'object' property is used to reference a specific named shape in a MagicaVoxel file, instead of using the whole file with all its shapes. In this case the car body and the wheels are in the same vox file, so here we reference only the body.
			-->
			<vox pos="0.05 -0.15 -0.25" rot="0 180 0" density="2" strength="2" file="LEVEL/MBSLS.vox" object="body">
				<!--
				A light is a light source in the game world.
				The 'pos' property sets it's position relative to its parent, or if it has no parent, the bottom center of the game world, in meters. 
				The 'rot' property sets the rotation of the object relative to it's parent, or if it has none, the botom center of the game world. The values are given as euler angles around the x, y and z axes.
				The 'type' property sets what type of light source it is. The available lightsources are; 'sphere', 'cone', or 'area'.
				The 'color' property sets the color of the light with the values being the Red, Gren, and Blue components in the color, each in the range 0.0 - 1.0
				The 'scale' property is a factor to sclae light intensity.
				The 'angle' property sets the cone angle in case of 'cone' lights.
				The 'penumbra' property sets the amount of penumbra (fuzziness at edge of light) for 'cone' lights.
				The 'size' property sets the light radius in case of 'sphere' or 'cone' lights, width and height in case of 'area' lights. Values are in meters.
				The 'unshadowed' property set a distance in meters that is always unshadowed. Useful to avoid shadows from light fixtures and/or emissive light surfaces.
				The 'glare' property sets whether a lens flare should be visible when the player is looking at the light. A value in the range 0.0-1.0.
				-->
				<light pos="0.6 0.38 2.0" rot="0.0 0.0 0.0" type="cone" color="1 .9 .8" scale="20" angle="50" penumbra="15" size="0.1" unshadowed="0.2" glare="0.4"/>
				<light pos="-0.5 0.38 2.0" rot="0.0 0.0 0.0" type="cone" color="1 .9 .8" scale="20" angle="50" penumbra="15" size="0.1" unshadowed="0.2" glare="0.4"/>
				<light pos="0.4 0.55 -2.1" rot="0.0 180.0 0.0" type="area" size="0.2 0.1" unshadowed="0.3"/>
				<light pos="-0.3 0.55 -2.1" rot="0.0 180.0 0.0" type="area" size="0.2 0.1" unshadowed="0.3"/>
				<light pos="0.6 0.50 -2.1" rot="0.0 -180.0 0.0" type="area" color="1 .1 .1" size="0.2 0.1" unshadowed="0.2" glare="0.2"/>
				<light pos="-0.5 0.55 -2.1" rot="0.0 -180.0 0.0" type="area" color="1 .1 .1" size="0.2 0.1" unshadowed="0.2" glare="0.2"/>
				<!--
				Locations are used for certain functions that is not actual objects in the scene.
				-->
				<!--
				The 'tags' property ('exhaust') of this location indicates that vehicle exhaust will emit from this point. 
				-->
				<location tags="exhaust" pos="0.5 0.1 -2.1" rot="-180.0 360.0 -180.0"/>
				<!-- 
				The 'tags' property ('vital') of this location indicates that this is a vital part of the vehicle, and the vehicle will be completely unusable if it is destroyed. 
				-->
				<location tags="vital" pos="0.05 0.55 -1.4" rot="-180.0 360.0 -180.0"/>
				<!-- 
				The 'tags' property ('player') of this location indicates that this is the location of the camera when the player is in the vehicle. 
				-->
				<location tags="player" pos="0.4 0.75 0.15" rot="0.0 0.0 0.0"/>
			</vox>
			<!-- 
			Wheels are used to define the wheels of a vehicle. 
			The 'name' property of this 'wheel' has no functional implication, but indicates that this is the back left wheel.
			The 'pos' property sets it's position relative to its parent, in this case the body on line 56.
			The 'drive' property sets how much of the engine power is applied to this wheel. Normaly in the range 0.0-1.0.
			The 'travel' property sets the suspension travel distance from its normal position along the y axis.
			-->
			<wheel name="bl" pos="-0.64999 -0.0 0.9" drive="1" travel="-0.1 0.1">
				<!--
				This is the actual vox shape used for the wheel.
				-->
				<vox pos="-0.1 -0.25 -0.05" rot="0.0 -180.0 0.0" file="LEVEL/MBSLS.vox" object="wheel_fl"/>
			</wheel>
			<wheel name="br" pos="0.65001 -0.0 0.9" drive="1" travel="-0.1 0.1">
				<vox pos="0.2 -0.25 -0.05" rot="0 180 0" file="LEVEL/MBSLS.vox" object="wheel_fr"/>
			</wheel>
			<wheel name="fl" pos="-0.64999 -0.0 -1.4" drive="1" steer="0.7" travel="-0.1 0.1">
				<vox pos="-0.1 -0.25 -0.05" rot="0 180 0" file="LEVEL/MBSLS.vox" object="wheel_bl"/>
			</wheel>
			<wheel name="fr" pos="0.65001 -0.0 -1.4" drive="1" steer="0.7" travel="-0.1 0.1">
				<vox pos="0.2 -0.25 -0.05" rot="0.0 -180.0 0.0" file="LEVEL/MBSLS.vox" object="wheel_br"/>
			</wheel>
		</body>
	</vehicle>
	<!-- 
	The boundary is the orange grid which the player can not pass through. It is defined by a number of vertices.
	-->
	<boundary>
		<!-- 
		These vertices defines the boundary of the game level.
		The 'pos' property sets the position of the vertex relative to the bottom center of the game world, in meters. As the boundary has infinite height the positions are only given relative to width and length, without height.
		-->
		<vertex pos="-100.0 -100.0"/>
		<vertex pos="100.0 -100.0"/>
		<vertex pos="100.0 100.0"/>
		<vertex pos="-100.0 100.0"/>
	</boundary>
	<!-- 
	This loads and runs the referenced script when the level starts.
	The 'file' property is the reference to which script should be loaded and run. Since this file reference is not preceded by 'LEVEL/' it is loaded from the 'data/script' folder in the installation folder.
	-->
	<script file="../../data/script/main.lua"/>
</scene>