<_templates Include="trucks">
	<Body>
	</Body>
</_templates>
<TruckAddon IsChassisFullOcclusion="true">
	<TruckData RepairsCapacity="100" />
	<RepairsHide>
		<Mesh Frame="wh" HideThreshold="0.0" />
	</RepairsHide>
	<PhysicsModel Mesh="trucks/kamaz_excavator2">
		<Body ImpactType="Truck" Mass="1400">
			<Constraint Type="Fixed" />			
			<Body Mass="400" ModelFrame="crane_cdt">
				<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="-350"
					MaxLimit="350"
					Name="Crane"
					Type="Hinge"
				>
					<Motor Force="40000" Tau="0.04" Type="Position" />
				</Constraint>
					<Body Mass="20" ModelFrame="cran1_cdt">
					<Constraint
						AxisLocal="(0;0;-1)"
						MinLimit="-40"
			            MaxLimit="37"
						Name="Crane"
						Type="Hinge"
					>
						<Motor Type="Position" Force="15000000" Tau="0.20" />
				</Constraint>
				<Body Collisions="Internal" Mass="300" ModelFrame="cran2_cdt">
					<Constraint
						AxisLocal="(0;0;-1)"
						MinLimit="-130"
				MaxLimit="95"
						Name="Crane"
						Type="Hinge"
					>
							<Motor
						Type="Position"
						Force="10500000"
						Tau="0.25"
						Damping="1.0" />
					</Constraint>
						<Body Collisions="Internal" Mass="50" ModelFrame="cran3_cdt">
								<Constraint
									AxisLocal="(0;0;-1)"
									MinLimit="-20"
									MaxLimit="100"
									Name="Crane"
									Type="Hinge"
								>
										<Motor Force="1200000" Tau="0.4" Type="Position" />
								</Constraint>
					<Body Collisions="Internal"
									ForceBodyParams="true"
									Mass="50"
									ModelFrame="grap_cdt"
								>
									<Constraint
										AxisLocal="(0;0;-1)"
										MinLimit="-60"
			                        	MaxLimit="90"
										Name="GrapplerBase"
										Type="Hinge"
									>
										<Motor Force="1200000" Tau="0.4" Type="Position" />
									</Constraint>
				       </Body>
					</Body>
						</Body>
					</Body>
						</Body>
					</Body>
	</PhysicsModel>	
	<GameData GaragePoints="1">
		<RequiredAddon Types="kamaz_excovator_platform" />
		<InstallSocket Type="KamazExcavator2" Offset="(0.1; -0.0; 0.0)" />
	</GameData>	
		<ControlledIK>
		<Chain
			AffectedFrames="crane_cdt,cran1_cdt,cran2_cdt,cran3_cdt"
				CenterXZ="(-1.105; 0)"
			EndOffset="(2.168; -2.168; 0.117)"
			HelperVisFrame="grap_cdt"
			Id="crane"
			ModelFrames="platform_cdt,crane_cdt,cran1_cdt,cran2_cdt,cran3_cdt"
		/>
	</ControlledIK>
		<ControlledConstraints>
		<Constraint Id="crane_grappler" LinkToControlledIK="crane" Name="GrapplerBase" />		
	</ControlledConstraints>	
<AddonCamera
		FirstPersonDir="(1.0; -0.32; 0.0)"
		FirstPersonPos="(-1.75; 3.76; 3.5)"
		ParentFrame="crane_cdt"
	/>
</TruckAddon>
