<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="FendtFrontloader">
    <annotation>SFM-Modding</annotation>
    <name>
        <en>Fendt Frontloader</en>
        <de>Fendt Frontlader</de>
    </name>
	<typeDesc>
        <en>Frontloader</en>
        <de>Frontlader</de>
    </typeDesc>

    <description></description>
    <filename>FendtFrontloader/FendtFrontloader.i3d</filename>

    <size width="3.5" length="5.5" lengthOffset="5"/>	
	
	<cylinderedHydraulicSound file="$data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.8" volume="0.4" />
	
    <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="0|1" attacherJointIndices="0" componentJointIndex="1" anchorActor="0" rotSpeed="20" rotAcceleration="145" rotMax="14" rotMin="-63" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="true" speedFactor="0.5">
			<dependentPart index="0|0" />
			<dependentPart index="0|2" />
			<dependentPart index="0|1|1|0" />
			<dependentPart index="0|1|1|0|0" />
			<dependentPart index="0|1|0|1" />
        </movingTool>	
        <movingTool index="0|1|2|0" attacherJointIndices="0" anchorActor="0" rotSpeed="40" rotAcceleration="160" rotMax="90" rotMin="-25" axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="false" speedFactor="0.5">
            <dependentPart index="0|1|1|0" />
			<dependentPart index="0|1|1|0|0" />
			<dependentPart index="0|1|0|1" />
        </movingTool>
		<!-- support -->
        <movingTool index="1" componentJointIndex="0" anchorActor="0" />
    </movingTools>

    <movingParts>
        <!-- arm cylinder -->
        <movingPart index="0|0" referencePoint="0|1|3" referenceFrame="0>">
            <translatingPart index="0>0|0|0" />
        </movingPart>
		<movingPart index="0|2" referencePoint="0|1|0|0" referenceFrame="0>" scaleZ="true" />
        <!-- front top hinge -->
        <movingPart index="0|1|1|0|0" referencePoint="0|1|2|0|0" referenceFrame="0>" scaleZ="true" />
		
        <!-- tool cylinder -->
        <movingPart index="0|1|0|1" referencePoint="0|1|1|0|1" referenceFrame="0>">
            <translatingPart index="0|1|0|1|0" />
        </movingPart>
    </movingParts>	
	
	<animations>
        <!-- move support collision -->
        <animation name="moveSupport">
			<part node="1" startTime="0"    duration="0.01" startTrans="0 0.40 -0.19"   endTrans="0 0.40 1.32988" />
			<part node="1" startTime="0.01" duration="0.01" startTrans="0 0.40 1.32988" endTrans="0 -1.31403 1.32988" />
        </animation>
    </animations>		
    <support animationName="moveSupport" />	
	
	<frontloader>
		<mainArm index="0|1" detachLimit="5" />
		<supportArms index="0|3" />
		<attachingPipes index="0|4" />
		<parts>
			<part index="0|1|0" minRot="-5.93" maxRot="42" depMovingTool="0" />
			<part index="0|1|1" minRot="0" maxRot="72" depMovingTool="0" />
			<part index="0|1|1|0" minRot="-16" maxRot="65" depMovingTool="1" inverted="true" />
			<part index="0|1|2" minRot="0" maxRot="72" depMovingTool="0" />				
		</parts>
	</frontloader>

	<attacherJoint index="0" jointType="attachableFrontloader"/>	
	<needsLowering value="false" />
	<attacherJoints>
		<attacherJoint jointType="frontloader" index="0|1|2|0|1" allowsJointLimitMovement="false" allowsLowering="false" />
    </attacherJoints>
	

	
	<components count="3">
        <component1 centerOfMass="0 -1.37723 1.2" solverIterationCount="60" /><!---0.77 2.1-->
		<component2 centerOfMass="0 0 0" solverIterationCount="15" />
		<component3 centerOfMass="0 0 0" solverIterationCount="20" />        
		<joint component1="0" component2="1" index="0>1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="0" component2="2" index="0>0|1" rotLimit="0 0 0" transLimit="0 0 0" />
    </components>
</vehicle>
