<_templates Include="trucks">
</_templates>

<TruckAddon IsChassisFullOcclusion="true">
	<TruckData RepairsCapacity="100" />
	<RepairsHide>
		<Mesh Frame="wh" HideThreshold="0.0" />
	</RepairsHide>
	<PhysicsModel Mesh="trucks/Excavator">
	<Body Mass="1400" ImpactType="Truck" CenterOfMassOffset="(0; -0.75; 0)" >
			<Constraint Type="Fixed" />

	<Body Mass="400" CenterOfMassOffset="(-1.5; 0; 0)" 
			NoFoliageCollisions="true" ImpactType="Truck" ModelFrame="cran_base" >
		<Constraint
			Name="Crane"
			Type="Hinge"
			AxisLocal="(0;-1;0)"
			MinLimit="-350"
			MaxLimit="350"
		>
			<Motor Type="Position" Force="40000" />
		</Constraint>

	<Body Collisions="Internal" Mass="300" ImpactType="Truck" ModelFrame="cran_arm1" >
		<Constraint
			Name="Crane"
			Type="Hinge"
			AxisLocal="(0;0;-1)"
			MinLimit="-40"
			MaxLimit="27"
		>
			<Motor Type="Position" Force="150000" Tau="0.20" />
		</Constraint>

	<Body Collisions="Internal"  Mass="200" ImpactType="Truck" ModelFrame="cran_arm2" >
		<Constraint
			Name="Crane"
			Type="Hinge"
			AxisLocal="(0;0;-1)"
			MinLimit="-20"
			MaxLimit="90"
		>
				<Motor
					Type="Position"
					Force="105000"
					Tau="0.25"
					Damping="1.0" />
		</Constraint>

			<Body
				Mass="100"
				NoClientCollisions="true"
				Collisions="Internal"
				Friction="4"
				ForceBodyParams="true"
				ImpactType="Truck"
				ModelFrame="grap">
		<Constraint
			Name="Grappler"
			Type="Hinge"
			AxisLocal="(0;0;-1)"
			MinLimit="-35"
			MaxLimit="90"
		>
				<Motor
					Type="Position"
					Force="75000"
					Damping="0.5"

					/>
		</Constraint>
					</Body>
				</Body>
			</Body>
		</Body>
	</Body>
	</PhysicsModel>
	
	<ModelAttachments>
		<HeadLight>
			<Model _template="HeadLightRay" Org="(-0.05; 1.5; -0.82)" ParentFrame="cran_base" />
			<Flare _template="HeadLight" Pos="(-0.05; 1.5; -0.82)" ParentFrame="cran_base" />
			<Flare _template="BlueStreak" Pos="(-0.05; 1.5; -0.82)" ParentFrame="cran_base" />
		</HeadLight>
	</ModelAttachments>
	<HeadLight
		_template="Default"
		AttenEnd="32"
		Dir="(1.0; -0.8; 0)"
		Pos="(1.2; 3.76; 0.0)"
		ParentFrame="cran_base"
	/>
	<GameData>
		<RequiredAddon Types="Rest" />
		<InstallSocket Type="UralLoaderAE" Offset="(0.25; -0.1; 0.0)" />
		<WinchSocket ParentFrame="grap" Pos="(6.33; 1.9; 0.0)" />
	</GameData>
	<ControlledIK>
		<Chain
			AffectedFrames="cran_base,cran_arm1,cran_arm2,grap"
			CenterXZ="(-1.105; 0)"
			EndOffset="(2.168; -2.168; 0.117)"
			HelperVisFrame="grap"
			Id="AE-1401"
			ModelFrames="platform,cran_base,cran_arm1,cran_arm2"
		/>
	</ControlledIK>
	<ControlledConstraints>
		<Constraint Id="crane_grap" LinkedControlledIK="AE-1401" Name="Grappler" />
	</ControlledConstraints>
<AddonCamera
		FirstPersonDir="(1.0; -0.32; 0.0)"
		FirstPersonPos="(-1.75; 3.76; 3.5)"
		ParentFrame="cran_base"
	/>
</TruckAddon>
