<_templates Include="trucks">
	<Wheel>
		<TrailerWheel			
			SuspensionMin="-0.2"
			HardpointOffsetY="-0.07"
			SuspensionStrength="0.053"
			SuspensionDamping="0.6"
			Type="maz_platform"
		/>
	</Wheel>
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.25"
		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 RepairsCapacity="300">
		<OcclusionMap
			HalfSizeZ="2.2"
			MinX="-14.8"
			MaxX="-4.2"
			Texture="trucks/occlusion/chassis_trailer__s_d_a.tga"
		/>
		<Constraint
			PlaneAxisLocal="(0; 0; 1.0)"
			PlaneMin="-90"
			PlaneMax="90"
			TwistAxisLocal="(1.0; 0; 0)"
			TwistMin="-30"
			TwistMax="30"
			Type="Ragdoll"
		>
			<TwistMotor Damping="150000" Spring="920000" Type="Spring" />
		</Constraint>
		<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="-60" />
		</Group>
		<Group Id="anchors_position">
			<Constraint Name="Ramp" Position="108" TerminalFix="true" />
			<Constraint
				InitialFix="true"
				Name="RampBack"
				Position="20"
				TerminalFix="true"
			/>
		</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/MAZ_tral">
		<Body CenterOfMassOffset="(-1.5; -0.6; 0)" Mass="8000">
			<Body
				ForceBodyParams="true"
				Mass="800"
				ModelFrame="BoneFoot_cdt"
				NoFoliageCollisions="true"
			>
				<Constraint
					AxisLocal="(1; 0; 0)"
					MinLimit="-60"
					MaxLimit="0"
					Name="Foot"
					Type="Hinge"
				>
					<Motor Force="160000" Type="Position" />
				</Constraint>
			</Body>
			<Body ModelFrame="BoneChain1_cdt" Collisions="None" Mass="30">
				<Constraint
					AxisLocal="(0; 0; -1)"
					MinLimit="-25"
					MaxLimit="5"
					Type="Hinge"
				>
					<Motor Damping="10" Spring="10" Type="Spring" />
				</Constraint>
			</Body>
			<Body ModelFrame="BoneChain2_cdt" Collisions="None" Mass="30">
				<Constraint
					AxisLocal="(0; 0; -1)"
					MinLimit="-25"
					MaxLimit="5"
					Type="Hinge"
				>
					<Motor Damping="10" Spring="10" Type="Spring" />
				</Constraint>
			</Body>
			<Body
				AngularDamping="8.0"
				Collisions="None"
				LinearDamping="8.0"
				Mass="150"
				ModelFrame="BoneSpareWheel_cdt"
			>
				<Constraint
					Cone="2"
					PlaneAxisLocal="(0; 0; 1.0)"
					TwistAxisLocal="(0; 1.0; 0)"
					Type="Ragdoll"
				/>
			</Body>
			<Body Mass="1000" ModelFrame="BoneBackFootBase_cdt">
				<Constraint
					AxisLocal="(0;0;1)"
					MinLimit="0"
					MaxLimit="20"
					Name="RampBack"
					Type="Hinge"
				>
					<Motor Force="250000" Tau="0.07" Type="Position" />
				</Constraint>
				<Body Mass="300" ModelFrame="BoneBackFoot_cdt">
					<Constraint
						AxisLocal="(0;0;1)"
						MinLimit="0"
						MaxLimit="108"
						Name="Ramp"
						Type="Hinge"
					>
						<Motor Force="65000" Type="Position" />
					</Constraint>
				</Body>
			</Body>
		</Body>
	</PhysicsModel>
	<GameData>	
		<WinchSocket Pos="(-3.0; 1.85; 0)" />
		<WinchSocket Pos="(-5.241; 1.967; 0.337)" />
		<WinchSocket Pos="(-9.656; 0.968; -1.448)" />
		<WinchSocket Pos="(-9.656; 0.968; 1.448)" />
		<WinchSocket Pos="(-13.531; 0.867; 0)" />
		<RequiredAddon Types="maz_tractor,maz_big_tractor,mzkt_tractor" />
		<InstallSocket Offset="(-2.278; 1.85; 0)" Type="MazTrailer" />
		<LoadArea
			Min="(-5.5; 0.685; -1.4)"
			Max="(-19.0; 2.45; 1.4)"
			TrailerLoad="true"
			Type="LongLogs"
			ParentFrame="BoneRoot_cdt"
		/>		
		<AddonSockets>
			<Socket Names="conteiner_gruz" Offset="(-10.412; 1.03; 0)" />
		</AddonSockets>
	</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>
		<IKBone ModelFrame="BoneBackBase" ParentFrame="BoneRoot_cdt">
			<IKJoint AxisLocal="(0;0;1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneBackFootBase_cdt"
				ModelFrame="BoneBack"
			>
				<IKJoint AxisLocal="(1;0;0)" Type="Slider" />
			</IKBone>
		</IKBone>
	</AutomaticIK>
</Truck>
