<?xml version="1.0"?>
<_templates Include="trucks">
	<Wheel>
		<TrailerWheel
			DefaultWheelType="kamaz_wheel_double"
			SteeringAngle="0"
			ParentFrame="BoneRear_cdt"
		>
			<Suspension MinLimit="-0.3" Strength="0.01" />
		</TrailerWheel>
	</Wheel>
</_templates>
<Truck>
	<GameData FuelCapacity="8000" RepairsCapacity="12000" ExcludeTrucks="maz">
		<RequiredAddon Type="maz2_tractor,maz_tractor,kraz_tractor" />
		<InstallSocket Type="KamazTrailer" Offset="(0.5; 1.2; 0.0)" />
		<WinchSocket ParentFrame="BoneRear_cdt" Offset="(-7.64; 0.653; 0.723)" />
		<WinchSocket ParentFrame="BoneRear_cdt" Offset="(-7.64; 0.653; -0.723)" />
	</GameData>
	<TruckData>
		<Camera Center="(-6.0; 0; 0)" />
		<OcclusionMap
			Texture="occlusion/chassis__da_uncmp.tga"
			Size="(9.9; 3.5)"
			Offset="-3.0"
		/>
		<TrailerConstraint _template="Default" />
		<Axles>
			<Axle
				Frame="BoneAxle0"
				LeftWheel="0"
				RightWheel="1"
			/>
			<Axle
				Frame="BoneAxle1"
				LeftWheel="2"
				RightWheel="3"
			/>
		</Axles>
	</TruckData>
	<PhysicsModel Mesh="trailer_utility.xml">
		<Body
			ModelFrame="BoneFront_cdt"
			Mass="2000"
			ImpactType="Truck"
			CenterOfMassOffset="(-2.0; 0; 0)"
		>
			<Body
				ModelFrame="BoneRear_cdt"
				Mass="2000"
				ImpactType="Truck"
			>
				<Constraint
					Type="Ragdoll"
					PlaneAxis="(0; 0; 1.0)"
					TwistAxis="(1.0; 0; 0)"
					Cone="15"
					TwistMin="-15"
					TwistMax="15"
					PlaneMin="0"
					PlaneMax="0"
					PivotOffset="(2.304; -0.117; 0.0)"
				>
					<PlaneMotor
						Type="Spring"
						Spring="1800000"
						Damping="40000"
					/>
					<TwistMotor
						Type="Spring"
						Spring="100000"
						Damping="8000"
					/>
				</Constraint>
			</Body>
			<Body
				ModelFrame="BoneFoot_cdt"
				Mass="100"
				NoFoliageCollisions="true"
			>
				<Constraint
					Name="Foot"
					Type="Prismatic"
					Axis="(0;1;0)"
					MinLimit="-0.634"
					MaxLimit="0"
				>
					<Motor Type="Position" Force="16000" />
				</Constraint>
			</Body>			
		</Body>
	</PhysicsModel>
	<PoweredConstraints>
		<foot_push>
			<Constraint
				Name="Foot"
				Position="-0.634"
				TerminalFix="true"
			/>
		</foot_push>
	</PoweredConstraints>	
	<FuelMass>
		<Body Mass="6000" />
	</FuelMass>
	<ModelAttachments>
		<Ignition>
			<Flare
				_template="MarkerBright"
				Offset="(1.015; 1.369; 1.178)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-1.266; 1.369; 1.178)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-3.188; 1.369; 1.178)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-4.937; 1.369; 1.178)"
				Direction="(0; 0; 1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(1.015; 1.369; -1.178)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-1.266; 1.369; -1.178)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-3.188; 1.369; -1.178)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-4.937; 1.369; -1.178)"
				Direction="(0; 0; -1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			
			<Flare
				_template="RedSignal"
				Offset="(-7.671; 1.252; 0.965)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="RedSignal"
				Offset="(-7.671; 1.252; -0.965)"
				ParentFrame="BoneRear_cdt"
			/>
		</Ignition>
		<StopSignals>
			<Flare
				_template="StopSignal"
				Offset="(-7.671; 1.252; 0.965)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="StopSignal"
				Offset="(-7.671; 1.252; -0.965)"
				ParentFrame="BoneRear_cdt"
			/>
			<Light
				_template="StopSignal"
				Offset="(-7.471; 1.452; 0)"
				ParentFrame="BoneRear_cdt"
			/>
		</StopSignals>
	</ModelAttachments>
	<Wheels>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-5.528; 0.564; 0.89)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-5.528; 0.564; -0.89))" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-6.88; 0.564; 0.89))" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-6.88; 0.564; -0.89))" />
		</Wheel>
	</Wheels>
</Truck>
