<_templates Include="trucks">
	<Body>
		<Grappler
			Collisions="Internal"
			ForceBodyParams="true"
			Friction="2.0"
			Mass="100"
			NoClientCollisions="true"
		>
			<Constraint AxisLocal="(0;0;1)" Type="Hinge">
				<Motor
					Damping="1.0"
					Force="20000"
					Tau="0.04"
					Type="Position"
				/>
			</Constraint>
		</Grappler>
		<Anchor Mass="200">
			<Constraint
				AxisLocal="(0;1;0)"
				MinLimit="0"
				MaxLimit="0.6"
				Name="AnchorExt"
				Type="Prismatic"
			>
				<Motor Force="4000" Tau="0.2" Type="Position" />
			</Constraint>
			<Body Collisions="None" Mass="150">
				<Constraint AxisLocal="(1;0;0)" Type="Hinge">
					<Motor Force="2000" Type="Position" />
				</Constraint>
				<Body
					ForceBodyParams="true"
					Mass="100"
					NoFoliageCollisions="true"
				>
					<Constraint
						AxisLocal="(0;1;0)"
						MinLimit="0"
						MaxLimit="0.8"
						Name="Anchor"
						Type="Prismatic"
					>
						<Motor Force="8000" Type="Position" />
					</Constraint>
				</Body>
			</Body>
		</Anchor>
	</Body>
</_templates>
<TruckAddon IsChassisFullOcclusion="true">
<PoweredConstraints>
		<Group Id="crane_grab" IsGamepadHotkey="true">
			<Constraint Name="RightGrappler" Position="-120" SpeedMult="2" />
			<Constraint Name="LeftGrappler" Position="120" SpeedMult="2" />
		</Group>
		<Group Id="anchors_position">
				<Constraint Name="lapy" Position="180" SpeedMult="2" />
			<Constraint Name="lapy1" Position="-180" SpeedMult="2" />
				<Constraint Name="lapy2" Position="-0.8" SpeedMult="2" />
			<Constraint Name="lapy3" Position="-0.8" SpeedMult="2" />
		</Group>
		<Group Id="anchors_push">
			<Constraint Name="Anchor" Position="0.8" SpeedMult="2" />
			
		</Group>
		
	</PoweredConstraints>
<RepairsHide>
		<Mesh HideThreshold="0.0" Frame="wheel" />
	</RepairsHide>
	<PhysicsModel Mesh="trucks/kran432040">
		
			<Constraint Type="Fixed" />
				<Body Mass="1200"
                CenterOfMassOffset="(0.0; -0.0; 0.0)"
				ModelFrame="BoneKran_cdt" Collisions="All">
				<Constraint Type="Fixed" ExplicitParentFrame="0" />
			<Body Mass="400" ModelFrame="BoneRotationBase_cdt">
				<Constraint
					AxisLocal="(0;-1;0)"
					MinLimit="-350"
					MaxLimit="350"
					Name="crane"
					Type="Hinge"
				>
					<Motor Force="40000" Tau="0.4" Type="Position" />
				</Constraint>
	<Body  Collisions="Internal" Mass="300" ModelFrame="BoneArm1_cdt">
					<Constraint
						AxisLocal="(1;0;0)"
						MinLimit="-0"
						MaxLimit="110"
						Name="crane"
						Type="Hinge"
					>
						<Motor Force="120000" Tau="0.1" Type="Position" />
					</Constraint>
				<Body 	 Collisions="Internal" Mass="200" ModelFrame="BoneArm2_cdt">
						<Constraint
							AxisLocal="(1;0;0)"
							MinLimit="-260"
							MaxLimit="0"
							Name="crane"
							Type="Hinge"
						>
							<Motor Force="60000" Tau="0.2" Type="Position" />
						</Constraint>
						<Body Collisions="Internal" Mass="100" ModelFrame="BoneArm3_cdt">
							<Constraint
								AxisLocal="(0;1.2;1)"
								MinLimit="0"
								MaxLimit="1.5"
								Name="crane"
								Name="1"
								Type="Prismatic"
							>
								<Motor Force="50000" Tau="0.4" Type="Position" />
							</Constraint>
					<Body Collisions="Internal" Mass="40" ModelFrame="BoneGrapplerBase_cdt">
								<Constraint
									AxisLocal="(1;0;0)"
									MinLimit="-0"
									MaxLimit="170"
									Type="Hinge"
								>
									<Motor Damping="100" Spring="100" Type="Spring" />
								</Constraint>
								<Body Collisions="Internal" Mass="40" ModelFrame="BoneGrapplerBase_cdt001">
									<Constraint
										AxisLocal="(0;0;1)"
										MinLimit="-10"
										MaxLimit="10"
										Type="Hinge"
									>
										<Motor Damping="300" Spring="300" Type="Spring" />
									</Constraint>
									<Body
										Collisions="Internal"
										ForceBodyParams="true"
										Mass="40"
										ModelFrame="BoneGrappler_cdt"
									>
										<Constraint
											AxisLocal="(0;1;0)"
											MinLimit="-180"
											MaxLimit="180"
											Name="GrapplerBase"
											Type="Hinge"
										>
											<Motor Force="12000" Tau="0.4" Type="Position" />
										</Constraint>
										<Body _template="Grappler" ModelFrame="BoneGrapplerLeft_cdt">
											<Constraint MinLimit="0" MaxLimit="120" Name="LeftGrappler" />
										</Body>
										<Body _template="Grappler" ModelFrame="BoneGrapplerRight_cdt">
											<Constraint MinLimit="-120" MaxLimit="120" Name="RightGrappler" />
											</Body>
												</Body>		
								</Body>
							</Body>
						</Body>
					</Body>
			
		</Body>
				
			</Body>
			<Body
		
										Collisions="None"
									
										Mass="100"
										ModelFrame="BoneLapaLev_Glavnay"
									>
										<Constraint
											AxisLocal="(0;0;-1)"
											MinLimit="-0.8"
											MaxLimit="0"
											Name="lapy2"
											Type="Prismatic"
										>
											<Motor Force="180000" Tau="0.02" Type="Position" />
										</Constraint>
			<Body
		
										Collisions="Internal"
									
										Mass="100"
										ModelFrame="BoneLapaLev_cdt"
									>
										<Constraint
											AxisLocal="(1;0;0)"
											MinLimit="0"
											MaxLimit="180"
											Name="lapy"
												Type="Hinge"
										>
											<Motor Force="180000" Tau="0.02" Type="Position" />
										</Constraint>

			
		<Body
		
										Collisions="Internal"
									
										Mass="100"
										ModelFrame="BoneLapaLev_cdt001"
									>
										<Constraint
											AxisLocal="(0;1;0)"
											MinLimit="0"
											MaxLimit="0.8"
											Name="Anchor"
											Type="Prismatic"
										>
											<Motor Force="8000" Type="Position" />
										</Constraint>
</Body>
</Body>	
	</Body>	
	<Body
		
										Collisions="None"
									
										Mass="100"
										ModelFrame="BoneLapaRight_Glavnay"
									>
										<Constraint
											AxisLocal="(0;0;1)"
											MinLimit="-0.8"
											MaxLimit="0"
											Name="lapy3"
											Type="Prismatic"
										>
											<Motor Force="180000" Tau="0.02" Type="Position" />
										</Constraint>
		<Body
		
										Collisions="Internal"
									
										Mass="100"
										ModelFrame="BoneLapaRight_cdt"
									>
										<Constraint
											AxisLocal="(1;0;0)"
											MinLimit="-180"
											MaxLimit="0"
											Name="lapy1"
												Type="Hinge"
										>
											<Motor Force="180000" Tau="0.02" Type="Position" />
										</Constraint>
		
			
		<Body
										Collisions="Internal"
										
										Mass="100"
										ModelFrame="BoneLapaRight_cdt001"
									>
										<Constraint
											AxisLocal="(0;1;0)"
											MinLimit="0"
											MaxLimit="0.8"
											Name="Anchor"
											Type="Prismatic"
										>
											<Motor Force="8000" Type="Position" />
										</Constraint>											
						
	
	
	
</Body>
</Body>
</Body>
	</Body>
</PhysicsModel>
	<GameData>
		<InstallSocket Type="kran" />
	</GameData>
	<ControlledIK>
		<Chain
			CenterXZ="(0.309; 0.427)"
			EndOffset="(0; 1.56; 0)"
			Id="crane"
			
			ModelFrames="BoneKran_cdt,BoneRotationBase_cdt,BoneArm1_cdt,BoneArm2_cdt,BoneArm3_cdt"
			VerticalLineFrame="BoneGrappler_cdt"
		/>
	</ControlledIK>
	<ControlledConstraints>
		<Constraint Id="crane_grappler" LinkToControlledIK="crane" Name="GrapplerBase" />
		
	</ControlledConstraints>
	
	<AutomaticIK>
		<IKBone ModelFrame="gidro_cdt001" ParentFrame="BoneArm1_cdt">
			<IKJoint AxisLocal="(1;0;0)" Type="Hinge" />
			<IKBone
				AttachOffset="(0.0; 0.00; 0.00)"
				AttachToFrame="BoneArm2_cdt"
				ModelFrame="gidro2_cdt001"
			>
				<IKJoint AxisLocal="(0;0.6;1)" Type="Slider" />
			
				</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneArmPistonBase" ParentFrame="BoneArm1_cdt">
			<IKJoint AxisLocal="(1;0;0)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 1.333; 0)"
				AttachToFrame="BoneConnector1"
				ModelFrame="BoneArmPiston"
			>
				<IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="gidro_cdt" ParentFrame="BoneArm1_cdt">
			<IKJoint AxisLocal="(1;0;0)" Type="Hinge" />
			<IKBone
				AttachOffset="(1; 0.0; 0)"
				AttachToFrame="BoneRotationBase_cdt"
				ModelFrame="gidro2_cdt"
			>
				<IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			</IKBone>
		</IKBone>
			</AutomaticIK>
				<AddonCamera
		FirstPersonDir="(0.019; -1.6; 0.0)"
		FirstPersonPos="(0.75; 3.76; 1.2)"
		ParentFrame="BoneRotationBase_cdt"
	/>
</TruckAddon>
