<_templates Include="trucks">
	<Wheel>
		<Wheel
			Type="koleso_pricep_krone"
			HardpointOffsetY="-0.2"
			SuspensionMin="-0.5"
			SuspensionStrength="0.015"
			Torque="default"
		/>
	</Wheel>
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.6"
		HardpointDefaultZ="1.05"
	>
		<Wheel _template="Wheel" HardpointX="-3.377" />
		<Wheel _template="Wheel" HardpointX="-3.377" RightSide="true" />
		<Wheel _template="Wheel" HardpointX="-4.645" />
		<Wheel _template="Wheel" HardpointX="-4.645" RightSide="true" />
		<Wheel _template="Wheel" HardpointX="-5.937" />
		<Wheel _template="Wheel" HardpointX="-5.937" RightSide="true" />	
	</Wheels>
	<TruckData RepairsCapacity="200" >
		<OcclusionMap HalfSizeZ="1.75" MinX="-7.84" MaxX="1.36" />
		<Constraint _template="TrailerRagdoll" />
		<Camera Center="(-5.0; 1; 0)" />
	</TruckData>
	<PoweredConstraints>
		<Group Id="bort">
			<Constraint InitialFix="true" Name="bort" Position="120" />
		</Group>		
		<Group Id="foot_push">
			<Constraint Name="Foot" Position="-0.8" TerminalFix="true" />
		</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/pricep_tonar_mercedes">
		<Body CenterOfMassOffset="(-2.0; -0.6; 0)" Mass="6500">
			<Body Mass="500" ModelFrame="BoneKuzov_cdt">
				<Constraint
					AxisLocal="(0;0;1)"
					MinLimit="0"
					MaxLimit="37"
					Name="samasval"
					Type="Hinge"
				>
					<Motor Force="85000" Type="Position" />
				</Constraint>
				<Body Mass="100" ModelFrame="BoneKrihka_cdt">
					<Constraint
						AxisLocal="(0;0;1)"
						MinLimit="-120"
						MaxLimit="0"
						Name="bort"
						Type="Hinge"
					/>
				</Body>			
			<Body
				ForceBodyParams="true"
				Mass="200"
				ModelFrame="BoneOpora_cdt"
				NoFoliageCollisions="true"
			>
				<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="-0.6"
					MaxLimit="0"
					Name="Foot"
					Type="Prismatic"
				>
					<Motor Force="16000" Type="Position" />
				</Constraint>
			</Body>
		</Body>
	</Body>	
	</PhysicsModel>
	<ModelAttachments>
		<ReverseSignals>
			<Light _template="ReverseSignal" Pos="(-6.539; 0.0;  0.0)" />
			<Flare _template="ReverseSignal" Pos="(-6.539; 0.933;  -0.821)" />
			<Flare _template="ReverseSignal" Pos="(-6.539; 0.933;   0.804)" />
		</ReverseSignals>		
		<Ignition>
			<Light _template="StopSignal" Pos="(-6.539; 0.0; 0)" />			
			<Flare _template="StopSignal" Pos="(-6.539; 0.933; -1.145)" />
			<Flare _template="StopSignal" Pos="(-6.539; 0.933;  1.124)" />
		</Ignition>				
		<StopSignals>
			<Light _template="StopSignal" Pos="(-6.539; 0.0; 0)" />
			<Flare _template="StopSignal" Pos="(-6.539; 0.933;  -0.884)" />
			<Flare _template="StopSignal" Pos="(-6.539; 0.933;   0.88)" />
		</StopSignals>
	</ModelAttachments>
	<GameData>
		<WinchSocket Pos="(-6.952; 0.581; 0.706)" />
		<WinchSocket Pos="(-6.952; 0.581; -0.706)" />
		<WinchSocket Pos="(0.0; 1.0; 0)" />	
		<InstallSocket Offset="(0; 1.0; 0.0)" Type="pricep" />
		<AddonSockets>
			<Socket Names="gruz_chernozem_tonar" />
		</AddonSockets>		
		<LoadArea
			Min="(0.5; -2.2; -1.5)"
			Max="(-7.5; 3.0; 1.5)"
			TrailerLoad="true"
			Type="ShortLogs"
		/>			
	</GameData>
	<ControlledConstraints>
		<Constraint Id="kuzov" Name="samasval" />
	</ControlledConstraints>	
	<AutomaticIK>
		<IKBone
			AttachToFrame="BoneKuzov_cdt"
			ModelFrame="arn4"
			ParentFrame="Tonar_Cdt"
		>
			<IKJoint AxisLocal="(0;0;1)" Type="Hinge"  />
			<IKBone
				AttachToFrame="BoneKuzov_cdt"
				ModelFrame="arn3"
				ParentFrame="arn4"
				AttachOffset="(0; -0.1; 0)"
			>
				<IKJoint AxisLocal="(0;-1;0)" Type="Slider"  />
				<IKBone
					ModelFrame="arn2"
					ParentFrame="arn3"
					AttachToFrame="BoneKuzov_cdt"
					AttachOffset="(0; 1.949; 0)"
				>
					<IKJoint AxisLocal="(0;-1;0)" Type="Slider" />
					<IKBone
						ModelFrame="arn1"
						ParentFrame="arn2"
						AttachToFrame="BoneKuzov_cdt"
						AttachOffset="(0; 0.0; 0)"
					>
						<IKJoint AxisLocal="(0;-1;0)" Type="Slider" />
					</IKBone>
				</IKBone>
			</IKBone>
		</IKBone>
	</AutomaticIK>
</Truck>

