<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="frontloader">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Deutz Agrofarm</en>
        <de>Deutz Agrofarm</de>
    </name>
    <description></description>
    <filename>deutzAgrofarmFrontloader.i3d</filename>
    <wheels autoRotateBackSpeed="2.5">
        <wheel rotSpeed="70" rotMax="32" rotMin="-32" driveMode="2" repr="0" driveNode="0|0" radius="0.758" deltaY="0.05" suspTravel="0.1" spring="400" damper="20" mass="0.141" lateralStiffness="20" />
        <wheel rotSpeed="70" rotMax="32" rotMin="-32" driveMode="2" repr="1" driveNode="1|0" radius="0.758" deltaY="0.05" suspTravel="0.1" spring="400" damper="20" mass="0.141" lateralStiffness="20" />
        <wheel rotSpeed="0" driveMode="1" repr="2" radius="0.963" deltaY="0.05" suspTravel="0.1" spring="400" damper="20" mass="0.2" lateralStiffness="20" />
        <wheel rotSpeed="0" driveMode="1" repr="3" radius="0.963" deltaY="0.05" suspTravel="0.1" spring="400" damper="20" mass="0.2" lateralStiffness="20" />
    </wheels>
    <motor minRpm="100" maxRpm="650 1100 2300 530" maxTorques="2.0 2.5 -1 1.5" brakeForce="7" lowBrakeForceScale="0.5" lowBrakeForceSpeedLimit="1" accelerations="0.4 1 1 1" forwardGearRatio="11.5" backwardGearRatio="9" differentialRatio="1" rpmFadeOutRange="50">
		<torque rpm="2300" torque="4.9"/>

		<backwardTorque rpm="150" torque="9"/>
		<backwardTorque rpm="400" torque="1.4"/>
    </motor>
	<accelerationSpeed maxAcceleration="0.15" deceleration="0.25" backwardDeceleration="0.7" />
    <fuelCapacity>160</fuelCapacity>
    <fuelUsage>0.016</fuelUsage>
    <downForce>10</downForce>
    <cameras count="2">
        <camera1 index="4|0" rotatable="true" rotateNode="4" limit="true" rotMinX="-1.4" rotMaxX="0" transMin="4" transMax="40" >
			<raycastNode index="0>30"/>
			<raycastNode index="0>31"/>
		</camera1>
        <camera2 index="5" rotatable="true" limit="false" rotMinX="0" rotMaxX="0" transMin="0" transMax="0" />
    </cameras>
    <lights count="2">
        <light1 index="12" />
        <light2 index="13" />
    </lights>

	<lightCones>
		<lightCone index="27" />
	</lightCones>

	<lightCoronas>
		<lightCorona index="28" />
	</lightCoronas>

	<beaconLights>
		<beaconLight index="29|0" speed="0.016" />
		<beaconLight index="29|1" speed="0.016" />
	</beaconLights>
	
    <steering index="20|0" rotationSpeed="6"/>
    <enterReferenceNode index="0>" />
    <exitPoint index="9" />
    <size width="3.5" length="5.5" lengthOffset="-0.4"/>
    <cuttingAreas count="0">
        <!--cuttingArea1 startIndex="6" widthIndex="7" heightIndex="8" losing="true"/-->
    </cuttingAreas>

    <!--attacherJoint index="10" /-->
    <trailerAttacherJoints>
        <trailerAttacherJoint index="10" maxRotLimit="10 80 80" />
        <trailerAttacherJoint index="22" low="true" />
    </trailerAttacherJoints>
    <tipCamera index="11" />

    <mouseControls>
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/dafs_arm1.png" mouseButton="LEFT" mouseAxis="Y" axis="AXIS_FRONTLOADER_ARM" />
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/dafs_tool.png" mouseButton="LEFT" mouseAxis="X" axis="AXIS_FRONTLOADER_TOOL" />
    </mouseControls>

    <movingTools>
        <movingTool index="25" attacherJointIndices="2" componentJointIndex="0" anchorActor="0" rotSpeed="20" rotAcceleration="80" rotMax="5" rotMin="-80" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="true" speedFactor="0.3">
            <dependentPart index="0>25|1" />
        </movingTool>
        <movingTool index="25|0|1" attacherJointIndices="2" anchorActor="0" rotSpeed="35" rotAcceleration="300" rotMax="145" rotMin="5" axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="false" speedFactor="0.3">
            <dependentPart index="0>25|0|0" />
        </movingTool>
    </movingTools>

    <movingParts>
        <!-- arm cylinder -->
        <movingPart index="0>25|1" referencePoint="0>26|0" referenceFrame="0>26|0">
            <translatingPart index="0>25|1|0" />
        </movingPart>


        <!-- main hinge -->
        <movingPart index="0>25|0|0" referencePoint="0>25|0|1|1" localReferencePoint="0>25|0|0|0" referenceFrame="0>25|0|1|1">
            <dependentPart index="0>25|0|0|0" />
            <dependentPart index="0>25|2" />
        </movingPart>
        <!-- front top hinge -->
        <movingPart index="0>25|0|0|0" referencePoint="0>25|0|1|1" referenceFrame="0>25|0|1">
        </movingPart>

        <!-- tool cylinder -->
        <movingPart index="0>25|2" referencePoint="0>25|0|0|1" referenceFrame="0>25|0">
            <translatingPart index="0>25|2|0" />
        </movingPart>
    </movingParts>

    <motorStartDuration>2500</motorStartDuration>
    <attachSound file="$data/vehicles/steerable/deutz/attach.wav" pitchOffset="1" />
    <motorStartSound file="$data/vehicles/steerable/deutz/agrotron_xl_start.wav" pitchOffset="1" volume="2" />
    <motorSound file="$data/vehicles/steerable/deutz/agrotron_xl_idle.wav" pitchOffset="1" pitchScale="0.02" pitchMax="1.65" volume="2" />
    <motorSoundRun file="$data/vehicles/steerable/deutz/agrofarm_run.wav" pitchOffset="0.5" pitchScale="0.025" pitchMax="1.05" volume="0.65" />
    <motorStopSound file="$data/vehicles/steerable/deutz/agrotron_xl_out.wav" pitchOffset="1" />
    <compressedAirSound file="$data/vehicles/steerable/deutz/compressedAir.wav" pitchOffset="1" volume="1.0"/>
    <compressionSound file="$data/vehicles/steerable/deutz/compressorWork.wav" pitchOffset="1" volume="1.5"/>
	<cylinderedHydraulicSound file="$data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.8" volume="0.4" />
    <aiMotorSound  file="$data/vehicles/steerable/deutz/agrotron_xl_idleAI.wav" pitchOffset="1" radius="35" innerRadius="15" volume="1.0" />

    <exhaustParticleSystems count="1">
        <exhaustParticleSystem1 node="24" file="$data/vehicles/particleSystems/exhaustParticleSystem.i3d" />
    </exhaustParticleSystems>

	<honkSound file="$dataS2/sounds/horn.wav" client="$dataS2/sounds/horn3D.wav" volume="1" radius="80" innerRadius="35" />

    <attacherJoints>
        <attacherJoint index="14|0|0" rotationNode="14" maxRot="-12 0 0" rotationNode2="14|0" maxRot2="13 0 0" maxTransLimit="0 0.5 0" maxRotLimit="0 0 20" moveTime="1.5">
            <bottomArm rotationNode="15" translationNode="15|0" referenceNode="15|0|0" zScale="-1" />
            <topArm rotationNode="16" translationNode="16|0" referenceNode="16|0|0" zScale="-1" />
        </attacherJoint>
        <attacherJoint index="17|0|0" rotationNode="17" maxRot="10 0 0" rotationNode2="17|0" maxRot2="-7 0 0" maxTransLimit="0 0.5 0" maxRotLimit="0 0 20" moveTime="1.5">
            <bottomArm rotationNode="18" translationNode="18|0" referenceNode="18|0|0" zScale="1" />
            <topArm rotationNode="19" translationNode="19|0" referenceNode="19|0|0" zScale="1" />
        </attacherJoint>

        <!-- frontloader -->
        <attacherJoint jointType="frontloader" index="25|0|1|0" allowsJointLimitMovement="false" allowsLowering="false" />
    </attacherJoints>

    <characterNode index="21" cameraMinDistance="1.5" />
    <aiTrafficCollisionTrigger index="23" />
    <components count="2">
        <component1 centerOfMass="0 0 -0.3" solverIterationCount="20" />
        <component2 centerOfMass="0 -2.5 -0.3" solverIterationCount="20" />
        <joint component1="0" component2="1" index="0>25|3" rotLimit="0 0 0" transLimit="0 0 0" />
    </components>

</vehicle>
