<_templates Include="trucks">
	<Wheel>
		<RearWheel
			ConnectedToHandbrake="true"
			DefaultWheelType="ca30_rear_wheel"
			HardpointOffsetY="-0.15"
			SuspensionMin="-0.35"
			SuspensionMax="0.35"
			SuspensionStrengthInNewtonsPerMeter="105e3"
			SuspensionDampingInNewtonSecondsPerMeter="3e3"
			Torque="default"
		/>
		<FrontWheel
			DefaultWheelType="ca30_front_wheel"
			HardpointOffsetY="-0.15"
			SteeringAngle="43"
			SteeringAngleCasual="30"
			SteeringCastor="8"
			SuspensionMin="-0.35"
			SuspensionMax="0.35"
			SuspensionStrengthInNewtonsPerMeter="125e3"
			SuspensionDampingInNewtonSecondsPerMeter="3e3"
			ParentFrame="BoneCabin"
			Torque="full"
		/>
	</Wheel>
</_templates>

<Truck>
	<Wheels
		HardpointDefaultY="0.538"
		HardpointDefaultZ="0.92"
	>
		<Wheel _template="FrontWheel" HardpointX="2.532" BrakeTorque="6500" />
		<Wheel _template="FrontWheel" HardpointX="2.532" RightSide="true" BrakeTorque="6500" />
		<Wheel _template="RearWheel" HardpointX="-1.353" />
		<Wheel _template="RearWheel" HardpointX="-1.353" RightSide="true" />
		<Wheel _template="RearWheel" HardpointX="-2.531" />
		<Wheel _template="RearWheel" HardpointX="-2.531" RightSide="true" />		
	</Wheels>
	<TruckData
		BackSteerSpeed="0.07"
		EngineStartDelay="1.4"
		ExhaustStartTime="1.6"
		FuelCapacity="170"
		SteerResponsiveness="0.035"
		SteerSpeed="0.02"
		HasTireInflationSystem="true"		
	>
		<Steam Origin="(0.221; 0.969; 0)" />
		<Steam Origin="(3.358; 1.03; 0)" Scale="0.5" ParentFrame="BoneCabin" />
		<Sounds _template="Default" Origin="(2.441; 1.589; 0)" AirHissInterval="64.0" ParentFrame="BoneCabin">
			<EngineStop Sound="engine/ca30_stop" />
			<EngineStart Sound="engine/ca30_start" />
			<EngineLowOffload Sound="engine/ca30_low_off" />
			<EngineLow Sound="engine/ca30_low" />
			<EngineIdle Sound="engine/ca30_idle" />
			<EngineHighOffload Sound="engine/ca30_high_off" />
			<ExhaustAfterFire Sound="truck/shot" />
			<EngineChoke Sound="truck/choke" />
			<EngineTrans Sound="truck/trans_2" />
			<BrakeRelease Sound="truck/china_brake_release" />
			<BrakePull Sound="truck/china_brake_pull" />
		</Sounds>

		<Shafts>
			<Shaft SocketPointA="Shaft1a" SocketPointB="Shaft1b" />
			<Shaft SocketPointA="Shaft2a" SocketPointB="Shaft2b" />			
			<Shaft SocketPointA="Shaft3a" SocketPointB="Shaft3b" />
			<Shaft SocketPointA="Shaft4a" SocketPointB="Shaft4b" />		
			<Shaft SocketPointA="Shaft5a" SocketPointB="Shaft5b" />	
		</Shafts>
		<!--<OcclusionVolume
			HalfSizeZ="1.40"
			HeightFront="1"
			HeightRear="0.65"
			MinX="-3.17"
			MaxX="3.17"
		>
			<FullOcclusion HeightRear="1.0" />
		</OcclusionVolume>-->
		<OcclusionMap HalfSizeZ="1.22" MinX="-3.65" MaxX="3.44" />
		<Motor MaxDeltaAngVel="0.025" Torque="55756" ChokeChance="0.25" ChokeDuration="0.45" IsPetrolEngine="true">
			<ReverseGear AngVel="0.31" />
			<HighGear AngVel="6" />
			<Gear AngVel="0.33" />
			<Gear AngVel="2.42" />
			<Gear AngVel="3.34" />
			<Gear AngVel="4.76" />
			<Gear AngVel="5.94" />
		</Motor>
		<Exhaust Dir="(-0.3; -0.6; 0)" Origin="(2.295; 1.143; -0.207)" Speed="3.77" />

		<Driver Pos="(0.836; 1.473; 0.477)" ParentFrame="BoneCabin" />
		<Damage
			Capacity="400"
			SensationMin="(0.672; 1.8; -0.95)"
			SensationMax="(1.336; 2.31; 0.95)"
		/>
		<Camera
			CabinPos="(0.6; 3.5; 0.0)"
			RadiusMultiplier="0.8"
			ParentFrame="BoneCabin"
		/>
		<Axles>
			<Axle Frame="AxleBone1" LeftWheel="0" RightWheel="1" />
			<Axle Frame="AxleBone2" LeftWheel="2" RightWheel="3" />
			<Axle Frame="AxleBone3" LeftWheel="4" RightWheel="5" />			
		</Axles>
	</TruckData>
	<PhysicsModel Mesh="trucks/ca30/ca30">
		<Body
              CenterOfMassOffset="(-0.9; -1.5; 0)"
 ImpactType="Truck" Mass="3500">
			<Body ImpactType="Truck" Mass="1500" ModelFrame="BoneCabin">
				<Constraint
					AxisLocal="(1;0;0)"
					MinLimit="-35"
					MaxLimit="5"
					Type="Hinge"
				>
					<Motor Damping="16000" Spring="120000" Type="Spring" />
				</Constraint>
			</Body>
		</Body>
	</PhysicsModel>	
	<ModelAttachments>
		<StopSignals>
			<Light _template="StopSignal" Pos="(-3.375; 1.008; 0.544)" />
			<Light _template="StopSignal" Pos="(-3.375; 1.008; -0.544)" />			
			<Flare _template="StopSignal" Pos="(-3.375; 1.008; 0.544)" />
			<Flare _template="StopSignal" Pos="(-3.375; 1.008; -0.544)" />
		</StopSignals>	
		<Ignition>
			<Flare _template="MarkerSignal" Pos="(2.87; 1.359; 0.976)" ParentFrame="BoneCabin"/>
			<Flare _template="MarkerSignal" Pos="(2.87; 1.359; -0.976)" ParentFrame="BoneCabin"/>
			<Flare _template="RedSignal" Pos="(-3.375; 1.008; 0.544)" />
			<Flare _template="RedSignal" Pos="(-3.375; 1.008; -0.544)" />			
		</Ignition>	
		<HeadLight>
			<Model _template="HeadLightRay" Org="(2.973; 1.451; 0.723)" ParentFrame="BoneCabin" />
			<Model _template="HeadLightRay" Org="(2.973; 1.451; -0.723)" ParentFrame="BoneCabin" />
			<Flare _template="HeadLight" Pos="(2.973; 1.451; 0.723)" ParentFrame="BoneCabin" />
			<Flare _template="HeadLight" Pos="(2.973; 1.451; -0.723)" ParentFrame="BoneCabin" />
			<Flare _template="BlueStreak" Pos="(2.973; 1.451; 0.723)" ParentFrame="BoneCabin" />
			<Flare _template="BlueStreak" Pos="(2.973; 1.451; -0.723)" ParentFrame="BoneCabin" />
		</HeadLight>
	</ModelAttachments>
	<HeadLight _template="Default" Pos="(2.58; 1.275; 0.0)" ParentFrame="BoneCabin" />
	<GameData BalancePoints="2" >
		<WinchSocket Pos="(3.364; 1.149; 0.453)" ParentFrame="BoneCabin" />
		<WinchSocket Pos="(3.364; 1.149; -0.453)" ParentFrame="BoneCabin" />
		<WinchSocket Pos="(-3.552; 0.911; 0)" ParentFrame="BoneChassis" />
		<WinchSocket Pos="(-0.856; 1.045; 0.468)" ParentFrame="BoneChassis" />
		<WinchSocket Pos="(-0.856; 1.045; -0.468)" ParentFrame="BoneChassis" />

		<AddonSockets>
			<Socket Names="ca30_utility_1" ParentFrame="BoneChassis" NamesBlock="ca30_rear_standby_tank" />
			<Socket Names="ca30_main" ParentFrame="BoneChassis" />
			<Socket Names="ca30_cistern" ParentFrame="BoneChassis" NamesBlock="ca30_rear_standby_tank,ca30_spare" />
		</AddonSockets>
		<AddonSockets>
			<Socket Names="ca30_side_standby_tank" ParentFrame="BoneChassis"/>
			<Socket Names="ca30_spare" ParentFrame="BoneCabin" NamesBlock="ca30_cistern" />
		</AddonSockets>	
		<AddonSockets>
			<Socket Names="ca30_rear_standby_tank" ParentFrame="BoneCabin" NamesBlock="ca30_utility_1,ca30_cistern" />
		</AddonSockets>	

		<AddonSockets>
			<Socket Names="ca30_exhaust" ParentFrame="BoneCabin" />
			<Socket Names="ca30_exhaust2" ParentFrame="BoneCabin" />
		</AddonSockets>

		<AddonSockets>
			<Socket Names="ca_cabin_lights" ParentFrame="BoneCabin" Offset="(0.91; 2.51; 0)"/>
		</AddonSockets>

		<AddonSockets>
			<Socket Names="KamazTrailerCart" Offset="(-3.57; 0.891; 0)" />
		</AddonSockets>		
		<AddonSockets>
			<Socket Names="LoadShortFrontBottom" Offset="(0.15; 1.4; 0)" />
		</AddonSockets>
	</GameData>	
	<FKBones>
		<Bone
			Frame="BoneSteeringArmR"
			Input="Steering"
			Joint="Hinge"
			AxisLocal="(0;-1;0)"
			MinPosition="-25"
			RestPosition="0"
			MaxPosition="25"
		/>
		<Bone
			Frame="BoneSteeringArmL"
			Input="Steering"
			Joint="Hinge"
			AxisLocal="(0;-1;0)"
			MinPosition="-25"
			RestPosition="0"
			MaxPosition="25"
		/>

	</FKBones>
	<AutomaticIK>

		<IKBone
			ModelFrame="BoneSteeringArmC"
			ParentFrame="BoneSteeringArmL"
			AttachToFrame="BoneSteeringArmR"
			AttachOffset="(0; 0; -1.461)"
		>
			<IKJoint Type="Hinge" AxisLocal="(0;1;0)" />
		</IKBone>
	</AutomaticIK>	
</Truck>
