<_templates Include="trucks">
	<Body>
		
		
	</Body>
</_templates>
<TruckAddon IsChassisFullOcclusion="true">
	<PoweredConstraints>
		<Group Id="crane_grab" >
				<Constraint Name="zacep" Position="-90" TerminalFix="true" />
			
			
		</Group>
		<Group Id="bloc kryka">
			<Constraint Name="KrykPod" Position="2.5" TerminalFix="true" />
	</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/kran2">
		<Body ImpactType="Truck" Mass="4000">
			<Constraint Type="Fixed" />
			
			<Body Mass="2000" ModelFrame="BoneKran_cdt">
				<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="-350"
					MaxLimit="350"
					Name="Crane"
					Type="Hinge"
				>
					<Motor Force="50000000" Tau="0.01" Type="Position" />
				</Constraint>
				
						
					<Body  Mass="500" ModelFrame="BoneStrela_cdt" Collisions="Internal" >
					<Constraint
						AxisLocal="(0;0;1)"
						MinLimit="-0"
					MaxLimit="55"
						Name="Crane"
						Type="Hinge"
					>
							<Motor Damping="99999999999999" Spring="99999999999999" Type="Spring" />
				</Constraint>
			
			
				<Body Collisions="Internal" Mass="300" ModelFrame="Bonestrela4_cdt">
					<Constraint
						AxisLocal="(1;0;0)"
						MinLimit="-0"
					MaxLimit="2"
						Name="Crane"
						Type="Prismatic"
					>
				<Motor Type="Position" Force="10500000" Tau="0.005"
					 />
					</Constraint>
						<Body Collisions="Internal" Mass="50" ModelFrame="cran2_cdt">
								<Constraint
									AxisLocal="(0;0;1)"
									MinLimit="0"
									MaxLimit="0"
									Name="Crane"
									Type="Hinge"
								>
										<Motor Force="1200000" Tau="0.005" Type="Position" />
								</Constraint>
			


			<Body
				CenterOfMassOffset="(0.0; 0.0; 0)"
				ImpactType="Truck"
				Mass="200"
				ModelFrame="Bonekryk1_cdt"
			>
					  <Constraint
					                    Type="Ragdoll"
					                    TwistAxis="(1;0;1)"
					                    ConeMin="-60"
					                    ConeMax="60"
					                    TwistMin="-60"
					                    TwistMax="60"
				            >
				<AllMotor Type="Spring" Spring="200" Damping="150" />
				</Constraint>
 	<Body
				CenterOfMassOffset="(0.0; 0.0; 0)"
				ImpactType="Truck"
				Mass="50"
				ModelFrame="BoneKrykPod_cdt"
			>
			<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="-30"
					MaxLimit="2,5"
					Name="KrykPod"
					Type="Prismatic"
				>
					<Motor Force="22000"  Tau="0.0025" Type="Position" />
				</Constraint>
					<Body
				CenterOfMassOffset="(0.0; 0.0; 0)"
				ImpactType="Truck"
				Mass="50"
				ModelFrame="BoneKryk_cdt"
			>
				<Constraint
					AxisLocal="(0;1;0)"
					MinLimit="-360"
							MaxLimit="360"
					Name="Kryk"
					Type="Hinge"
				>
			<Motor
								Damping="0.9"
								Force="20000"
								Tau="0.01"
								Type="Position"
							/>
						</Constraint>
								<Body
				CenterOfMassOffset="(0.0; 0.0; 0)"
				ImpactType="Truck"
				Mass="50"
				ModelFrame="BoneLap_cdt"
			>
				<Constraint
					AxisLocal="(0;0;-1)"
					MinLimit="-90"
					MaxLimit="90"
					Name="zacep"
					Type="Hinge"
				>
					<Motor Force="500000"  Type="Position" />
				</Constraint>
				</Body>
					<Body
				CenterOfMassOffset="(0.0; 0.0; 0)"
				ImpactType="Truck"
				Mass="50"
				ModelFrame="BoneLap1_cdt"
			>
				<Constraint
					AxisLocal="(-0;-0;1)"
					MinLimit="-90"
					MaxLimit="0"
					Name="zacep"
					Type="Hinge"
				>
					<Motor Force="500000"  Type="Position" />
				</Constraint>
					</Body>
				</Body>
				</Body>
				</Body>	
				
				
					</Body>
						</Body>
					</Body>
						</Body>
					</Body>
			
			
	</PhysicsModel>
	
	<GameData>
	 <WinchSocket Pos="(4.031; 2.771; 0)"  ParentFrame="cran2_cdt" />
			<InstallSocket Type="kran2" />
		 <RequiredAddon Types="2-platforma6450,2-platform,2-platform4350" />
	</GameData>
	<ControlledConstraints>
	<Constraint Id="vira,maina" Name="KrykPod" />
		<Constraint Id="Kryk" Name="Kryk" />
		
	</ControlledConstraints>
		<ControlledIK>
		<Chain
			
				CenterXZ="(-1.105; 0)"
			EndOffset="(2.168; -2.168; 0.117)"
			HelperVisFrame="BoneKryk_cdt"
			Id="crane"
			ModelFrames="Bone_cdt,BoneKran_cdt,BoneStrela_cdt,Bonestrela4_cdt,cran2_cdt"
		/>
	</ControlledIK>
		
	<AutomaticIK>
		<IKBone ModelFrame="cilindrniz" ParentFrame="BoneKran_cdt">
			<IKJoint AxisLocal="(0; -0; 1)" Type="Hinge" />
			<IKBone
			ModelFrame="cilindrverh"
			PanelFrame="cilindrniz"
				AttachOffset="(0.0; 0.0; 0)"
				AttachToFrame="BoneStrela_cdt"
				
			>
		    <IKJoint AxisLocal="(0;1;0)" Type="Slider" />
	</IKBone>
			</IKBone>
			<IKBone ModelFrame="strela" ParentFrame="BoneStrela_cdt">
			<IKJoint AxisLocal="(0; -0; 1)" Type="Hinge" />
			<IKBone
			ModelFrame="strela2"
			PanelFrame="strela"
				AttachOffset="(0.0; 0.0; 0)"
				AttachToFrame="strela3"
				
			>
		    <IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			<IKBone
			ModelFrame="strela3"
			PanelFrame="strela2"
				AttachOffset="(0.0; 0.0; 0)"
				AttachToFrame="strela4"
		     >
			 <IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			<IKBone
			ModelFrame="strela4"
			PanelFrame="strela3"
				AttachOffset="(0.0; 0.0; 0)"
				AttachToFrame="Bonestrela4_cdt"
		     >
			  <IKJoint AxisLocal="(0;1;0)" Type="Slider" />
			</IKBone>
			</IKBone>
			</IKBone>
			</IKBone>
	</AutomaticIK>

	<AddonCamera
		FirstPersonDir="(-9.0; -9.32; -12.0)"
		FirstPersonPos="(7.75; 3.76; 4.8)"
		ParentFrame="BoneKran_cdt"
	/>
	
	
</TruckAddon>
