<?xml version="1.0"?>
<_templates Include="trucks">
	<Wheel>
		<TrailerWheel
			DefaultWheelType="highway_wheel"
			SteeringAngle="0"
			Torque="default"
			ParentFrame="BoneRear_cdt"
		>
			<Suspension
				MinLimit="-0.3"
				HardpointOffset="-0.12"
				Strength="0.015"
			/>
		</TrailerWheel>
	</Wheel>
</_templates>
<Truck>
	<GameData GaragePoints="4" ExcludeTrucks="zil,kraz,maz">
		<RequiredAddon Type="maz2_tractor,maz_tractor,kraz_tractor" />
		<InstallSocket Type="KamazTrailer" Offset="(0; 1.1; 0.0)" />
		<WinchSocket ParentFrame="BoneRear_cdt" Offset="(-11.05; 0.868; 0.6)" />	
	</GameData>
	<TruckData>
		<Camera Center="(-8.8; 0; 0)" />
		<OcclusionMap
			Texture="occlusion/chassis__da_uncmp.tga"
			Size="(12.5; 3.5)"
			Offset="-5.5"
		/>
		<TrailerConstraint _template="Default" />
		<Axles>
			<Axle
				Frame="BoneAxle0"
				LeftWheel="0"
				RightWheel="1"
			/>
			<Axle
				Frame="BoneAxle1"
				LeftWheel="2"
				RightWheel="3"
			/>
			<Axle
				Frame="BoneAxle2"
				LeftWheel="4"
				RightWheel="5"
			/>
		</Axles>
	</TruckData>
	<PhysicsModel Mesh="trailer_tent.xml">
		<Body
			ModelFrame="BoneFront_cdt"
			Mass="3000"
			CenterOfMassOffset="(-1.5; 0; 0)"
			ImpactType="Truck"
		>
			<Body
				ModelFrame="BoneRear_cdt"
				Mass="3000"
				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="(3.09537; 0.316711; 0.0)"
				>
					<PlaneMotor
						Type="Spring"
						Spring="2400000"
						Damping="36000"
					/>
					<TwistMotor
						Type="Spring"
						Spring="80000"
						Damping="8000"
					/>
				</Constraint>
				<Body ModelFrame="BoneRearTop_cdt" Mass="400">
					<Constraint
						Type="Prismatic"
						MinLimit="-0.25"
						MaxLimit="0.25"
						Axis="(0; 0; 1)"
					>
						<Motor
							Type="Spring"
							Spring="24000"
							Damping="800"
						/>
					</Constraint>
				</Body>
			</Body>
			<Body ModelFrame="BoneFrontTop_cdt" Mass="400">
				<Constraint
					Type="Prismatic"
					MinLimit="-0.25"
					MaxLimit="0.25"
					Axis="(0; 0; 1)"
				>
					<Motor
						Type="Spring"
						Spring="24000"
						Damping="800"
					/>
				</Constraint>
			</Body>
			<Body
				ModelFrame="BoneFoot_cdt"
				Mass="100"
				NoFoliageCollisions="true"
			>
				<Constraint
					Name="Foot"
					Type="Prismatic"
					Axis="(0;1;0)"
					MinLimit="-0.48"
					MaxLimit="0"
				>
					<Motor Type="Position" Force="32000" />
				</Constraint>
			</Body>
		</Body>
	</PhysicsModel>
	<PoweredConstraints>
		<foot_push>
			<Constraint
				Name="Foot"
				Position="-0.48"
				TerminalFix="true"
			/>
		</foot_push>
	</PoweredConstraints>
	<ModelAttachments>
		<Ignition>
			<Flare
				_template="MarkerBright"
				Offset="(1.295; 1.337; 1.144)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-1.82; 1.337; 1.144)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-5.285; 1.337; 1.144)"
				Direction="(0; 0; 1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-8.128; 1.337; 1.144)"
				Direction="(0; 0; 1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-10.918; 1.337; 1.144)"
				Direction="(0; 0; 1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-11.105; 3.839; 1.09)"
				Direction="(-1.0; 0; 0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(1.295; 1.337; -1.144)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-1.82; 1.337; -1.144)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-5.285; 1.337; -1.144)"
				Direction="(0; 0; -1.0)"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-8.128; 1.337; -1.144)"
				Direction="(0; 0; -1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-10.918; 1.337; -1.144)"
				Direction="(0; 0; -1.0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="MarkerBright"
				Offset="(-11.105; 3.839; -1.09)"
				Direction="(-1.0; 0; 0)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="RedSignal"
				Offset="(-11.097; 0.865; 0.938)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="RedSignal"
				Offset="(-11.097; 0.865; -0.938)"
				ParentFrame="BoneRear_cdt"
			/>
		</Ignition>
		<StopSignals>
			<Flare
				_template="StopSignal"
				Offset="(-11.097; 0.865; 0.938)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="StopSignal"
				Offset="(-11.097; 0.865; -0.938)"
				ParentFrame="BoneRear_cdt"
			/>
			<Light
				_template="StopSignal"
				Offset="(-10.7; 1.065; 0)"
				ParentFrame="BoneRear_cdt"
			/>
		</StopSignals>
		<ReverseSignals>
			<Flare
				_template="ReverseSignal"
				Offset="(-11.097; 0.865; 0.752)"
				ParentFrame="BoneRear_cdt"
			/>
			<Flare
				_template="ReverseSignal"
				Offset="(-11.097; 0.865; -0.752)"
				ParentFrame="BoneRear_cdt"
			/>
			<Light
				_template="ReverseSignal"
				Offset="(-10.7; 1.065; 0)"
				ParentFrame="BoneRear_cdt"
			/>
		</ReverseSignals>
	</ModelAttachments>
	<Wheels>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-6.557; 0.544; 0.944)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-6.557; 0.544; -0.944)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-7.862; 0.544; 0.944)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-7.862; 0.544; -0.944)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-9.182; 0.544; 0.944)" />
		</Wheel>
		<Wheel _template="TrailerWheel">
			<Suspension Hardpoint="(-9.182; 0.544; -0.944)" />
		</Wheel>
	</Wheels>
</Truck>
