<_templates Include="trucks">
	<Wheel>
		<TrailerWheel			
			SuspensionMin="-0.27"
			HardpointOffsetY="-0.12"
			SuspensionStrength="0.014"
			SuspensionDamping="0.14"
			Type="maz_platform"
		/>
	</Wheel>
	<Body>
		<Tros Collisions="None" Mass="30">
			<Constraint
				AxisLocal="(0; 0; -1)"
				MinLimit="-25"
				MaxLimit="5"
				Type="Hinge"
			>
				<Motor Damping="10" Spring="10" Type="Spring" />
			</Constraint>
		</Tros>
	</Body>
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.22"
		HardpointDefaultZ="0.84"
	>
		<Wheel _template="TrailerWheel" HardpointX="-10.508" />
		<Wheel _template="TrailerWheel" HardpointX="-10.508" RightSide="true" />
		<Wheel _template="TrailerWheel" HardpointX="-11.68" />
		<Wheel _template="TrailerWheel" HardpointX="-11.68" RightSide="true" />
		<Wheel _template="TrailerWheel" HardpointX="-12.855" />
		<Wheel _template="TrailerWheel" HardpointX="-12.855" RightSide="true" />
	</Wheels>
	<TruckData FuelCapacity="600" RepairsCapacity="1400">
		<OcclusionMap
			HalfSizeZ="2.2"
			MinX="-14.8"
			MaxX="-4.2"
			Texture="trucks/occlusion/chassis_trailer__s_d_a.tga"
		/>
		<LimitedFluid
			AxisX="(0; 1; 0)"
			Center="(-12.629; 1.513; 0.649)"
			LengthX="0.984"
			RadiusY="0.294"
			RadiusZ="0.294"
			Type="Cylinder"
		/>
		<LimitedFluid
			AxisX="(0; 1; 0)"
			Center="(-12.658; 1.513; 0.013)"
			LengthX="0.984"
			RadiusY="0.294"
			RadiusZ="0.294"
			Type="Cylinder"
		/>
		<LimitedFluid
			AxisX="(0; 1; 0)"
			Center="(-12.628; 1.513; -0.623)"
			LengthX="0.984"
			RadiusY="0.294"
			RadiusZ="0.294"
			Type="Cylinder"
		/>
		<Constraint _template="TrailerRagdoll" />
		<Camera Center="(-9.6; 0; 0)" RadiusMultiplier="1.2" />
		<Axles>
			<Axle Frame="BoneAxleL1" SingleWheel="4" />
			<Axle Frame="BoneAxleL2" SingleWheel="2" />
			<Axle Frame="BoneAxleL3" SingleWheel="0" />
			<Axle Frame="BoneAxleR1" SingleWheel="5" />
			<Axle Frame="BoneAxleR2" SingleWheel="3" />
			<Axle Frame="BoneAxleR3" SingleWheel="1" />
		</Axles>
	</TruckData>
	<PoweredConstraints>
		<Group Id="_trailer_foot">
			<Constraint InitialFix="true" Name="Foot" Position="-58" />
		</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/trailer_maz_platform">
		<Body CenterOfMassOffset="(-0.8; -0.6; 0)" Mass="10000">
			<Body
				ForceBodyParams="true"
				Mass="500"
				ModelFrame="BoneFoot_cdt"
				NoFoliageCollisions="true"
			>
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="-58"
					MaxLimit="0"
					Name="Foot"
					Type="Hinge"
				>
					<Motor Force="80000" Type="Position" />
				</Constraint>
			</Body>
			<Body Mass="4000" ModelFrame="BoneContainer_cdt">
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="-10"
					MaxLimit="10"
					Type="Hinge"
				>
					<Motor Damping="80000" Spring="1200000" Type="Spring" />
				</Constraint>
				<!--<Body Mass="400" ModelFrame="BoneBarrelsTop_cdt">
					<Constraint
						AxisLocal="(0; 0; 1)"
						MinLimit="-0.25"
						MaxLimit="0.25"
						Type="Prismatic"
					>
						<Motor Damping="20000" Spring="20000" Type="Spring" />
					</Constraint>
				</Body>-->
			</Body>
			<Body _template="Tros" ModelFrame="BoneChain1_cdt" />
			<Body _template="Tros" ModelFrame="BoneChain2_cdt" />
			<Body Mass="50" ModelFrame="BoneTailSwinger_cdt">
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="-10"
					MaxLimit="0"
					Type="Hinge"
				>
					<Motor Damping="100" Spring="80" Type="Spring" />
				</Constraint>
			</Body>
			<Body
				CenterOfMassOffset="(0; 0.5; 0)"
				Mass="50"
				ModelFrame="BoneBarrelsRearL_cdt"
			>
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="0"
					MaxLimit="10"
					Type="Hinge"
				>
					<Motor Damping="100" Spring="10" Type="Spring" />
				</Constraint>
			</Body>
			<Body
				CenterOfMassOffset="(0; 0.5; 0)"
				Mass="50"
				ModelFrame="BoneBarrelsRearR_cdt"
			>
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="-10"
					MaxLimit="0"
					Type="Hinge"
				>
					<Motor Damping="100" Spring="10" Type="Spring" />
				</Constraint>
			</Body>
			<Body
				AngularDamping="8.0"
				Collisions="None"
				LinearDamping="8.0"
				Mass="50"
				ModelFrame="BoneSpareWheel_cdt"
			>
				<Constraint
					Cone="2"
					PlaneAxisLocal="(0; 0; 1.0)"
					TwistAxisLocal="(0; 1.0; 0)"
					Type="Ragdoll"
				/>
			</Body>
		</Body>
	</PhysicsModel>
	<GameData GaragePoints="4">
		<WinchSocket Pos="(-14.4; 0.9; 0)" />
		<WinchSocket Pos="(-3.089; 1.965; 0)" />
		<WinchSocket Pos="(-9.656; 0.968; -1.448)" />
		<WinchSocket Pos="(-9.656; 0.968; 1.448)" />
		<RequiredAddon Types="maz_big_tractor,maz_tractor,mzkt_tractor" />
		<InstallSocket Offset="(-2.29; 1.85; 0)" Type="MazTrailer" />
	</GameData>
	<AutomaticIK>
		<IKBone ModelFrame="BoneFootPistonBase" ParentFrame="BoneRoot__cdt">
			<IKJoint AxisLocal="(1;0;0)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 1.022; 0)"
				AttachToFrame="BoneFoot_cdt"
				ModelFrame="BoneFootPiston"
			>
				<IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			</IKBone>
		</IKBone>
	</AutomaticIK>
	<FuelMass>
		<Body Mass="12000" />
	</FuelMass>	
</Truck>
