<_templates Include="trucks">
	<Wheel>
		<TrailerWheel
			HardpointOffsetY="-0.1"
			SuspensionMin="-0.1"
			SuspensionMax="0.05"
			SuspensionStrength="0.005"
			Torque="default"
			Type="maz_platform"
		/>
	</Wheel>
	<Body>
		<Runners
			Friction="2.0"
			Mass="200"
			NoFoliageCollisions="true"
		>
			<Constraint Type="Hinge"> 
				<Motor
					Damping="1.0"
					Force="20000"
					Tau="0.04"
					Type="Position"
				/>
			</Constraint>
		</Runners>
	</Body>	
	<!-- <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.273"
		HardpointDefaultZ="0.84"
	>
		<Wheel _template="TrailerWheel" HardpointX="-8.208" />
		<Wheel _template="TrailerWheel" HardpointX="-8.208" RightSide="true" />
		<Wheel _template="TrailerWheel" HardpointX="-9.38" />
		<Wheel _template="TrailerWheel" HardpointX="-9.38" RightSide="true" />
		<Wheel _template="TrailerWheel" HardpointX="-10.555" />
		<Wheel _template="TrailerWheel" HardpointX="-10.555" RightSide="true" />
	</Wheels>
	<TruckData RepairsCapacity="200">
	    <RepairsHide>
		   <Mesh HideThreshold="0.5" Frame="Wheel1" />
		   <Mesh HideThreshold="0.0" Frame="Wheel2" />
	    </RepairsHide>
		<OcclusionMap
			HalfSizeZ="2.2"
			MinX="-14.8"
			MaxX="-4.2"
			Texture="trucks/occlusion/chassis_trailer__s_d_a.tga"
		/>
		<Constraint _template="TrailerRagdoll" />
		<Camera Center="(-9.6; 0; 0)" RadiusMultiplier="1.2" />
		<Axles>
			<Axle Frame="BoneAxleL1" SingleWheel="0" />
			<Axle Frame="BoneAxleL2" SingleWheel="2" />
			<Axle Frame="BoneAxleL3" SingleWheel="4" />
			<Axle Frame="BoneAxleR1" SingleWheel="1" />
			<Axle Frame="BoneAxleR2" SingleWheel="3" />
			<Axle Frame="BoneAxleR3" SingleWheel="5" />
		</Axles>
	</TruckData>
	<PoweredConstraints>
		<Group Id="_trailer_foot">
			<Constraint Name="Foot" Position="0.5" TerminalFix="true" />
		</Group>
		<Group Id="Runner" >
			<Constraint InitialFix="true" Name="Runner" Position="10" SpeedMult=".5" />
		</Group>
		<Group Id="Runner2" >
			<Constraint InitialFix="true" Name="Runner2" Position="150" SpeedMult=".5" />
		</Group>
		<Group Id="Blok1" >
			<Constraint InitialFix="true" Name="Blok1" Position="25" SpeedMult=".5" />
		</Group>
		<Group Id="Blok2" >
			<Constraint InitialFix="true" Name="Blok2" Position="25" SpeedMult=".5" />
		</Group>
		<Group Id="Blok3" >
			<Constraint InitialFix="true" Name="Blok3" Position="25" SpeedMult=".5" />
		</Group>
		<Group Id="Blok4" >
			<Constraint InitialFix="true" Name="Blok4" Position="25" SpeedMult=".5" />
		</Group>
		<Group Id="Blok5" >
			<Constraint InitialFix="true" Name="Blok5" Position="25" SpeedMult=".5" />
		</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/b1_platform">
		<Body CenterOfMassOffset="(-0.8; -0.6; 0)" Mass="8000">
			<Body
				ForceBodyParams="true"
				Mass="100"
				ModelFrame="BoneFoot_cdt"
				NoFoliageCollisions="true"
			>
				<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="0"
					MaxLimit="0.5"
					Name="Foot"
					Type="Prismatic"
				>
					<Motor Force="200000" Type="Position" />
				</Constraint>
			</Body>
			<Body _template="Runners" ModelFrame="platform1_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="10" Name="Runner" />
			     <Body _template="Runners" ModelFrame="platform2_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="150" Name="Runner2" />
			     </Body>
			</Body>	
			<Body _template="Runners" ModelFrame="Object1_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="25" Name="Blok1" />
			</Body>
			<Body _template="Runners" ModelFrame="Object2_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="25" Name="Blok2" />
			</Body>
			<Body _template="Runners" ModelFrame="Object3_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="25" Name="Blok3" />
			</Body>
			<Body _template="Runners" ModelFrame="Object4_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="25" Name="Blok4" />
			</Body>
			<Body _template="Runners" ModelFrame="Object5_cdt">
					<Constraint AxisLocal="(0;0;1)" MinLimit="0" MaxLimit="25" Name="Blok5" />
			</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="(-11.243; 0.867; 0)" />
		<WinchSocket Pos="(0.005; 1.965; 0)" />
		<WinchSocket Pos="(-7.194; 0.968; -1.448)" />
		<WinchSocket Pos="(-7.194; 0.968; 1.448)" />
		<RequiredAddon Types="maz_big_tractor,maz_tractor,mzkt_tractor" />
		<InstallSocket Offset="(0; 1.85; 0)" Type="B1Trailer" />
	</GameData>
</Truck>
