<_templates Include="trucks">
	<Wheel>
		<RearWheel
			ConnectedToHandbrake="true"
			SteeringAngle="-30"
			SteeringCastor="8"
			SuspensionDamping="0.4"
			SuspensionMin="-0.2"
			SuspensionMax="0.01"
			SuspensionStrength="0.02"
			Torque="full"
			DefaultWheelType="lm742"
		/>
		<FrontWheel
			ConnectedToHandbrake="true"
			HardpointOffsetY="-0.1"
			SteeringAngle="30"
			SteeringCastor="8"
			SuspensionDamping="0.4"
			SuspensionMin="-0.2"
			SuspensionMax="0.01"
			SuspensionStrength="0.02"
			Torque="default"
			DefaultWheelType="lm742"
		/>
	</Wheel>
	<Flare>
		<FogSignal
			Color="g(168; 174; 193)"
			Dir="(1; 0; 0)"
			DirAngle="100"
			Size="0.8"
		/>
	</Flare>
	<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>
<Truck>
	<Wheels
		HardpointDefaultY="0.5"
		HardpointDefaultZ="0.95"
	>
		<Wheel _template="FrontWheel" HardpointX="1.423" />
		<Wheel _template="FrontWheel" HardpointX="1.423" RightSide="true" />
		<Wheel _template="RearWheel" HardpointX="-1.598" />
		<Wheel _template="RearWheel" HardpointX="-1.598" RightSide="true" />
	</Wheels>
	<TruckData
		BackSteerSpeed="0.015"
		EngineIconMesh="env/engine_default"
		EngineIconScale="1.3"
		EngineStartDelay="0.6"
		ExhaustStartTime="0.6"
		FuelCapacity="270"
		LockClothInvertDir="false"
		LockClothOrigin="(1.4; -0.5; -0.1)"
		LockClothScale="1.15"
		SteerResponsiveness="0.05"
		SteerSpeed="0.018"
		DiffLockType="Always"
	>
		<SteeringWheel Frame="BoneSteering" />
		<SteeringRack Frame="BoneRack" FrameSteerLeft="BoneRackLeft" FrameSteerRight="BoneRackRight" RackHalfSizeZ="0.714" />
		<SteeringRack Frame="BoneRack2" FrameSteerLeft="BoneRackLeft2" FrameSteerRight="BoneRackRight2" RackHalfSizeZ="0.714" />
		<Steam Origin="(0.116; 1.295; 0)" />
		<Steam Origin="(2.695; 1.653; 0)" Scale="0.5" />
		<Sounds
			_template="Default"
			DisableReversePitch="true"
			EngineHeavyVolume="1"
			Origin="(-0.086; 1.202; -0.687)"
		>
			<Reverse Sound="k8400/k8400_back_beeper" />
			<EngineStop Sound="k8400/k8400_stop" />
			<EngineStart Sound="k8400/k8400_start" />
			<EngineRev Sound="k9000/k9000_rev" />
			<EngineLow Sound="k8400/k8400_low" />
			<EngineIdle Sound="k8400/k8400_idle" />
			<EngineHigh Sound="k8400/k8400_high" />
			<EngineHeavy Sound="k8400/k8400_heavy" />
			<BrakeRelease Sound="k8400/k8400_break_release" />
		</Sounds>
		<!-- <Shakers>
			<Shaker Frame="BoneExhaust" MaxAngle="(2; 0; 2)" MaxFrequency="0.3" />
		</Shakers> -->
		<Shafts>
			<Shaft SocketPointA="Shaft1a" SocketPointB="Shaft1b" />
			<Shaft SocketPointA="Shaft2a" SocketPointB="Shaft2b" />
		</Shafts>
		<OcclusionVolume
			HalfSizeZ="1.1"
			HeightFront="1.6"
			HeightRear="1.1"
			MinX="-2.4"
			MaxX="2.1"
		/>
		<OcclusionMap
			HalfSizeZ="1.6"
			MinX="-3.0"
			MaxX="3.0"
		/>
		-------------------------------------------------------------------------
		<Motor BrakesDelay="0.5" MaxDeltaAngVel="0.0001" Torque="100000">
			<ReverseGear AngVel="0.3" />
			<HighGear AngVel="7.0" />
			<Gear AngVel="0.3" />
			<Gear AngVel="2.8" />
			<Gear AngVel="6.3" />
			<!-- <Gear AngVel="8.8" /> -->
		</Motor>
		------------------------------------------------------------------------------
		<Axles>
			<Axle Frame="AxleBone1" LeftWheel="0" RightWheel="1" />
			<Axle Frame="AxleBone2" LeftWheel="2" RightWheel="3" />
		</Axles>
		<!-- <Intake Dir="(1.0; 0; 0)" Origin="(3.373; 1.844; 0)" Size="0.8" /> -->
		<Exhaust
			Dir="(-0.796; 0.605; 0)"
			Origin="(-2.173; 2.05; -0.52)"
			Speed="3.00"
			IsLight="true"
		/>
		<Driver Pos="(-0.242; 1.498; 0.652)" />
		<Damage
			Capacity="600"
			SensationMin="(-0.957; 1.843; 0.192)"
			SensationMax="(-0.067; 2.572; 1.094)"
		/>
		<Camera CabinPos="(-0.520; 2.30; 0.652)" IsHood="true" RadiusMultiplier="0.9" />
	</TruckData>
	<PhysicsModel Mesh="trucks/new_holland_lm_742">
		<Body
			CenterOfMassOffset="(0.5; -0.5; 0)"
			ImpactType="Truck"
			Mass="10000"
		>
			<Body Collisions="Internal" Mass="300" ModelFrame="MainArm_cdt">
				<Constraint
					AxisLocal="(0; 0; 1)"
					MinLimit="0"
					MaxLimit="70"
					Name="Crane"
					Type="Hinge"
				>
					<Motor Force="320000" Tau="0.1" Type="Position" />
				</Constraint>
				<Body Collisions="Internal" Mass="200" ModelFrame="TopArm_cdt">
					<Constraint
						AxisLocal="(1; 0; 0)"
						MinLimit="0"
						MaxLimit="2"
						Name="Crane2"
						Type="Prismatic"
					>
						<Motor
							Force="500000"
							Tau="0.4"
							Type="Position"
							Damping="1"
						/>
					</Constraint>
					<Body Collisions="Internal" Mass="130" ModelFrame="BoneAttach_cdt" Friction="10.0">
						<Constraint
							AxisLocal="(0; 0; 1)"
							MinLimit="-100"
							MaxLimit="40"
							Name="Crane3"
							Type="Hinge"
						>
							<Motor Force="60000" Tau="0.2" Type="Position" />
						</Constraint>
					</Body>
					<Body Mass="80" ModelFrame="BoneA_cdt" Collisions="None">
						<Constraint
							AxisLocal="(0; 0; 1)"
							MinLimit="-100"
							MaxLimit="40"
							Name="Crane3"
							Type="Hinge"
						>
							<Motor Force="60000" Tau="0.2" Type="Position" />
						</Constraint>
					</Body>
				</Body>
			</Body>
		</Body>
	</PhysicsModel>
	<ModelAttachments>
		<StopSignals>
			<Light _template="StopSignal" Pos="(-2.22; 1.398; 0)" />
			<Flare _template="StopSignal" Pos="(-1.825; 1.635; +0.906)" Size="0.5" />
			<Flare _template="StopSignal" Pos="(-1.822; 1.635; -0.906)" Size="0.5" />
		</StopSignals>
		<ReverseSignals>
			<Light _template="ReverseSignal" Color="g(168; 174; 193)" Pos="(-2.22; 1.398; 0)" />
			<Flare _template="ReverseSignal" Color="g(168; 174; 193)" Pos="(-0.983; 2.622; +0.216)" Size="0.5" />
			<Flare _template="ReverseSignal" Color="g(168; 174; 193)" Pos="(-0.983; 2.621; +1.064)" Size="0.5" />
		</ReverseSignals>
		<Ignition>
			<Flare _template="IgnitionSignalRed" Pos="(-1.825; 1.635; +0.906)" />
			<Flare _template="IgnitionSignalRed" Pos="(-1.825; 1.635; -0.906)" />
		</Ignition>
		<HeadLight>
			<Model _template="HeadLightRay" Org="(1.429; 1.671; +0.719)" />
			<Model _template="HeadLightRay" Org="(1.429; 1.671; -0.719)" />
			<Flare _template="HeadLight" Pos="(1.429; 1.671; +0.719)" Size="0.5" />
			<Flare _template="HeadLight" Pos="(1.429; 1.671; -0.719)" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(1.429; 1.671; +0.719)" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(1.429; 1.671; -0.719)" Size="0.5" />
			-----------------------------------------------------------------------------
			<Model _template="HeadLightRay" Org="(1.643; 1.715; +0.074)" ParentFrame="MainArm_cdt" />
			<Model _template="HeadLightRay" Org="(1.643; 1.713; -0.273)" ParentFrame="MainArm_cdt" />
			<Flare _template="HeadLight" Pos="(1.643; 1.715; +0.074)" ParentFrame="MainArm_cdt" Size="0.5" />
			<Flare _template="HeadLight" Pos="(1.643; 1.713; -0.273)" ParentFrame="MainArm_cdt" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(1.643; 1.715; +0.074)" ParentFrame="MainArm_cdt" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(1.643; 1.713; -0.273)" ParentFrame="MainArm_cdt" Size="0.5" />
			-------------------------------------------------------------------------------------------------------
			<Model _template="HeadLightRay" Org="(0.395; 2.569; +1.088)" />
			<Model _template="HeadLightRay" Org="(0.395; 2.568; +0.191)" />
			<Flare _template="HeadLight" Pos="(0.395; 2.569; +1.088)" Size="0.5" />
			<Flare _template="HeadLight" Pos="(0.395; 2.568; +0.191)" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(0.395; 2.569; +1.088)" Size="0.5" />
			<Flare _template="BlueStreak" Pos="(0.395; 2.568; +0.191)" Size="0.5" />
		</HeadLight>
	</ModelAttachments>
	<HeadLight
		AttenEnd="40"
		AttenStart="1"
		Color="g(255; 212; 154) x 8.5"
		Dir="(1; -0.2; 0)"
		InnerCone="0"
		OuterCone="130"
		Pos="(2.8; 1.654; 0)"
	/>
	<GameData
		BalancePoints="4"
		LogPoints="2"
		ExcludeAddons="prisposoba_lm742"
	>
		<WinchSocket Pos="(1.552; 0.945; +0.306)" />
		<WinchSocket Pos="(1.552; 0.945; -0.306)" />
		<WinchSocket Pos="(0.004; 0.708; +1.078)" />
		<WinchSocket Pos="(-2.592; 0.884; +0.014)" />
		<WinchSocket Pos="(1.218; 1.636; -0.099)" ParentFrame="MainArm_cdt" />
		<WinchSocket Pos="(-1.533; 1.741; -0.099)" ParentFrame="MainArm_cdt" />
		<!-- <AddonSockets>
			<Socket Names="PrisposobaLM742" />
		</AddonSockets> -->
		<AddonSockets>
			<Socket Names="KamazTrailerCart,GazTrailer,MazTrailerCart,UmzTrailer" Offset="(-2.589; 0.882; +0.014)" />
			<Socket Names="PrisposobaLM742" />
		</AddonSockets>
		<AddonSockets>
			<Socket Names="AddonLM742" ParentFrame="BoneAttach_cdt" Offset="(0; 0.54; 0)" />
		</AddonSockets>
		<AddonSockets>
			<Socket Names="MarkerLM742" Offset="(-0.57; -0.35; 0.64)" />
		</AddonSockets>
	</GameData>
	<AutomaticIK>
		<IKBone ModelFrame="BoneA3" ParentFrame="TopArm_cdt">
			<IKJoint AxisLocal="(0; 0; 1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0.11; 0)"
				AttachToFrame="BoneA_cdt"
				ModelFrame="BoneB3"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneA2" ParentFrame="BoneChassis_cdt">
			<IKJoint AxisLocal="(0; 0; 1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="MainArm_cdt"
				ModelFrame="BoneB2"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneA1" ParentFrame="BoneChassis_cdt">
			<IKJoint AxisLocal="(0; 0; -1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="MainArm_cdt"
				ModelFrame="BoneB1"
			>
				<IKJoint AxisLocal="(1; 0; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
	</AutomaticIK>
	<ControlledConstraints>
		<Constraint ActionId="crane" Id="crane" Name="Crane" />
		<Constraint Id="crane" LinkToControlledConstraint="crane" Name="Crane2" />
		<Constraint Id="grab_rise" Name="Crane3" />
	</ControlledConstraints>
</Truck>
