<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="palletTruck">
	<storeData>
        <name>$l10n_shopItem_palletTruck</name>
		<specs>
            <maxSpeed>10</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_palletTruck</function>
        </functions>
        <image>store/store_palletTruck.png</image>
        <price>350</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>LSFMINNOVATIONS</brand>
        <category>lsfmFarmEquipmentPackBarrows</category>
        <shopHeight>1.2</shopHeight>
        <shopTranslationOffset>0 -0.004 0</shopTranslationOffset>
        <shopRotationOffset>-0.216 0 0</shopRotationOffset>
    </storeData>
    
	<base>
        <typeDesc>$l10n_typeDesc_palletTruck</typeDesc>
        <filename>palletTruck.i3d</filename>
        <size width="0.8" length="2.0" height="1.4" />
		<supportsRadio>false</supportsRadio>
		<canBeReset>true</canBeReset>
		<supportsPickUp>true</supportsPickUp>
        <components>
            <component centerOfMass="0 0.1 -0.1" solverIterationCount="10" mass="73"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <sounds filename="sounds/sackBarrow/sackBarrowSound.xml" volumeFactor="1.8"/>
    </base>
	   
	<wheels>
        <wheelConfigurations>
			<wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels autoRotateBackSpeed="1.6" hasSurfaceSounds="true" surfaceSoundTireType="street">
					<wheel hasTireTracks="false" hasParticles="false" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="wheelBackBase" driveNode="wheelBack" useReprDirection="false" supportsWheelSink="false" radius="0.11" width="0.05" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.08"/>
					</wheel>
					
                    <wheel hasTireTracks="true" hasParticles="false" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="wheelLeft" useReprDirection="false" radius="0.1" width="0.03" supportsWheelSink="false" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.05"/>
					</wheel>
                    
					<wheel isLeft="false" hasTireTracks="true" hasParticles="false" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="wheelRight" useReprDirection="false" radius="0.1" width="0.03" supportsWheelSink="false" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.05"/>
					</wheel>
				</wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="35" rotMax="90" rotCenterWheel1="2" rotCenterWheel2="3" rotCenterNode="wheelBackBase"/>
        </ackermannSteeringConfigurations>
    </wheels>
	
	<speedRotatingParts>
        <speedRotatingPart node="frontWheel1_left" wheelIndex="1" wheelScale="1"/>
        <speedRotatingPart node="frontWheel2_left" wheelIndex="1" wheelScale="1"/>
        <speedRotatingPart node="frontWheel1_right" wheelIndex="1" wheelScale="1"/>
        <speedRotatingPart node="frontWheel2_right" wheelIndex="1" wheelScale="1"/>
    </speedRotatingParts>
	
	<enterable isTabbable="false" enterText="$l10n_enterText_palletTruck">
        <enterReferenceNode node="enterReferenceNode" interactionRadius="2.0"/>
        <exitPoint node="enterReferenceNode"/>
		<nicknameRenderNode node="playerNode" offset="0 2 0"/>
        
		<cameras>
            <camera node="outdoorCamera" rotatable="true" rotateNode="outdoorCameraRot" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="3" transMax="20">
                <raycastNode node="cameraRaycastNode1"/>
                <raycastNode node="cameraRaycastNode2"/>
            </camera>
            <camera node="indoorCamera" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="false" />
        </cameras>

		<characterNode node="skeleton" animationNode="2" cameraMinDistance="1.75" spineRotation="270 0 90" useAnimation="true" />
		<enterAnimation name="enterAnimation"/>
    </enterable>

	<motorized turnOnText="$l10n_action_farmEquipmentOnText" turnOffText="$l10n_action_farmEquipmentOffText" forceSpeedHudDisplay="true">
        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
					<differential torqueRatio="0.2" maxSpeedRatio="3.0" wheelIndex1="2" wheelIndex2="3"/>
                    <differential torqueRatio="0.2" maxSpeedRatio="3.0" wheelIndex1="1" wheelIndex2="3"/>
                    <differential torqueRatio="0.2" maxSpeedRatio="3.0" differentialIndex1="1" differentialIndex2="2"/>
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>
       	
		<motorConfigurations>
			<motorConfiguration price="0" hp="5">
                <motor torqueScale="0.077" minRpm="850" maxRpm="2200" maxForwardSpeed="5" maxBackwardSpeed="5" brakeForce="0.01" lowBrakeForceScale="0.01" accelerationLimit="1.6" dampingRateScale="0.08">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
                </motor>
                <!-- <transmission minForwardGearRatio="118" maxForwardGearRatio="320" minBackwardGearRatio="165" maxBackwardGearRatio="320"/> -->
                <transmission minForwardGearRatio="550" maxForwardGearRatio="650" minBackwardGearRatio="165" maxBackwardGearRatio="320"/>
            </motorConfiguration>
        </motorConfigurations>
    </motorized>

	<pushHandTool>
        <raycast node1="raycast01" node2="raycast02" playerNode="playerNode" positionSmoothnessFactor="0.65" positionSmoothnessFactorSteering="0.0"/>
        <wheels front="2 3" back="1"/>
		<!-- <spine rotationForward="-10" rotationBackward="-10" rotationIdle="-5" ratio="0.6 0.2 0.2" speed="40"/> -->
        
		<!-- Finger poseIds= flatFingers, narrowFingers and wideFingers -->
		<ikChains>
            <target ikChain="rightArm"  targetNode="playerRightHandTarget" poseId="narrowFingers" /> 
            <target ikChain="leftArm"   targetNode="playerLeftHandTarget" poseId="narrowFingers"/>
        </ikChains>

		<customChainLimits>
            <customChainLimit chainId="leftArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="leftArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>

            <customChainLimit chainId="rightArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="rightArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>
        </customChainLimits>

        <playerConditionalAnimation>
            <item id="idle" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips>
                    <clip clipName="idle1Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="absSmoothedForwardVelocity" lower="0.2" />
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walk" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="1.65">
					<clip clipName="NPCWalkMale03Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="0.3, 4"/>
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walkBack" entryTransitionDuration="0.5" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="2.25">
                    <clip clipName="walkBwdLoopSource" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="-3, -0.3" />
                    </conditionGroup>
                </conditions>
            </item>
        </playerConditionalAnimation>
    </pushHandTool>

	<lights>
	</lights>

	<ai supportsAIJobs="false">
        <agentAttachment />
    </ai>
    
	<drivable>
        <sounds>
            <waterSplash template="waterSplash01"/>
        </sounds>
        <cruiseControl enabled="false"/>
    </drivable> 

	<turnOnVehicle isAlwaysTurnedOn="true"/>
	
	<animations>
		<animation name="enterAnimation">
            <part node="steeringBar" startTime="0" endTime="0.1" startRot="0 0 0" endRot="-43.316 0 0"  />
            <part node="steeringBarCylinder" startTime="0" endTime="0.1" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
        </animation>
	
        <animation name="forkMovement">
            <part node="palletTruckFork" startTime="0" endTime="1.0" startTrans="0 0 0" endTrans="0 0.13 0" />
			<!-- <part node="tineCollisionLeft" startTime="0" endTime="1.0" startTrans="0.186 0.03 0.281" endTrans="0.186 0.064 0.281" startRot="0 0 0" endRot="-4.578 0 0"/>
			<part node="tineCollisionRight" startTime="0" endTime="1.0" startTrans="-0.186 0.03 0.281" endTrans="-0.186 0.064 0.281" startRot="0 0 0" endRot="-4.578 0 0"/> -->
			
			<part node="tineCollisionLeft" startTime="0" endTime="1.0" startTrans="0.186 0.03 0.281" endTrans="0.186 0.064 0.281" />
			<part node="tineCollisionRight" startTime="0" endTime="1.0" startTrans="-0.186 0.03 0.281" endTrans="-0.186 0.064 0.281" />
			
			<part node="wheelsFront" startTime="0" endTime="1.0" startTrans="0 0 0" endTrans="0 -0.025 0.188" />
			
			<part node="steeringBar" startTime="0" endTime="0.1" startRot="-43.316 0 0" endRot="0 0 0"  />
			<part node="steeringBar" startTime="0.1" endTime="0.2" startRot="0 0 0" endRot="-43.316 0 0"  />
			<part node="steeringBar" startTime="0.2" endTime="0.3" startRot="-43.316 0 0" endRot="0 0 0"  />
			<part node="steeringBar" startTime="0.3" endTime="0.4" startRot="0 0 0" endRot="-43.316 0 0"  />
			<part node="steeringBar" startTime="0.4" endTime="0.5" startRot="-43.316 0 0" endRot="0 0 0"  />
			<part node="steeringBar" startTime="0.5" endTime="0.6" startRot="0 0 0" endRot="-43.316 0 0"  />
			<part node="steeringBar" startTime="0.6" endTime="0.7" startRot="-43.316 0 0" endRot="0 0 0"  />
			<part node="steeringBar" startTime="0.7" endTime="0.8" startRot="0 0 0" endRot="-43.316 0 0"  />
			<part node="steeringBar" startTime="0.8" endTime="0.9" startRot="-43.316 0 0" endRot="0 0 0"  />
			<part node="steeringBar" startTime="0.9" endTime="1.0" startRot="0 0 0" endRot="-43.316 0 0"  />
			
			<part node="player" startTime="0.0" endTime="0.1" startRot="43.316 0 0" endRot="0 0 0"  startTrans="0 0.68375498 -0.78606999" endTrans="0 0.68375498 -0.589"/>
			<part node="player" startTime="0.1" endTime="0.2" startRot="0 0 0" endRot="43.316 0 0"  />
			<part node="player" startTime="0.2" endTime="0.3" startRot="43.316 0 0" endRot="0 0 0"  />
			<part node="player" startTime="0.3" endTime="0.4" startRot="0 0 0" endRot="43.316 0 0"  />
			<part node="player" startTime="0.4" endTime="0.5" startRot="43.316 0 0" endRot="0 0 0"  />
			<part node="player" startTime="0.5" endTime="0.6" startRot="0 0 0" endRot="43.316 0 0"  />
			<part node="player" startTime="0.6" endTime="0.7" startRot="43.316 0 0" endRot="0 0 0"  />
			<part node="player" startTime="0.7" endTime="0.8" startRot="0 0 0" endRot="43.316 0 0"  />
			<part node="player" startTime="0.8" endTime="0.9" startRot="43.316 0 0" endRot="0 0 0"  />
			<part node="player" startTime="0.9" endTime="1.0" startRot="0 0 0" endRot="43.316 0 0"  startTrans="0 0.68375498 -0.589" endTrans="0 0.68375498 -0.78606999"/>
			
            <part node="steeringBarCylinder" startTime="0.0" endTime="0.1" startTrans="0 0.0575 -0.115" endTrans="0 0.093 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.1" endTime="0.2" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.2" endTime="0.3" startTrans="0 0.0575 -0.115" endTrans="0 0.093 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.3" endTime="0.4" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.4" endTime="0.5" startTrans="0 0.0575 -0.115" endTrans="0 0.093 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.5" endTime="0.6" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.6" endTime="0.7" startTrans="0 0.0575 -0.115" endTrans="0 0.093 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.7" endTime="0.8" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.8" endTime="0.9" startTrans="0 0.0575 -0.115" endTrans="0 0.093 -0.115"  />
			<part node="steeringBarCylinder" startTime="0.9" endTime="1.0" startTrans="0 0.093 -0.115" endTrans="0 0.0575 -0.115"  />
        </animation>
    </animations>
	
	<cylindered>
        <movingTools>
            <movingTool node="palletTruckFork" playSound="true">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="0.15" iconName="FORKLIFT_TRANSLATE_Y" />
                <animation animName="forkMovement" animSpeed="0.15" animAcceleration="1" animStartTime="0.05"/>
				<dynamicMountAttacher value="true"/>
            </movingTool>
			
			<movingTool node="wheelsFront" wheelIndices="2 3"/>
        </movingTools>

        <sounds>
            <actionSound template="clickShort"  pitchScale="0.8" volumeScale="0.9" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_POS"                   nodes="palletTruckFork"          fadeIn="0.1" fadeOut="0.05"/>
            <actionSound template="clickShort"  pitchScale="2.7" volumeScale="0.9" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_NEG"                   nodes="palletTruckFork"          fadeIn="0.1" fadeOut="0.05"/>
			<actionSound template="metalClose"       pitchScale="2.5" volumeScale="0.2" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="palletTruckFork"/>
            <actionSound template="clackVar6"        pitchScale="1.0" volumeScale="0.5" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="palletTruckFork"/>
            <actionSound template="metalLowVar2"     pitchScale="1.3" volumeScale="0.5" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="palletTruckFork"/>
            <actionSound template="cylinderPunch"    pitchScale="1.8" volumeScale="0.2" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="palletTruckFork"/>
            <actionSound template="metalClose"       pitchScale="2.8" volumeScale="0.1" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="palletTruckFork"/>
            <actionSound template="clackVar6"        pitchScale="1.8" volumeScale="0.5" linkNode="palletTruckFork"          actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="palletTruckFork"/>
        </sounds>
    </cylindered>

    <dynamicMountAttacher node="jointNode" forceAcceleration="10" forceLimitScale="0.1" transferMass="false">
        <fork node="tineCollisionLeft" />
        <fork node="tineCollisionRight"/>
    </dynamicMountAttacher>
	
	<tensionBeltObject>
        <meshNodes>
            <meshNode node="palletTruckFork"/>
        </meshNodes>
    </tensionBeltObject>
    
	<foliageBending>
        <bendingNode minX="-0.412" maxX="0.412" minZ="-0.733" maxZ="0.681" yOffset="0.5"/>
    </foliageBending>
    
	<baseColorConfigurations useDefaultColors="true">
        <baseColorConfiguration materialTemplateName="AGRISEM_YELLOW1"/>
		<baseColorConfiguration color="0.1 0.15 0.1" name="SPECIAL GREEN" />
		
		<material materialSlotName="base_color_mat"/>
    </baseColorConfigurations>

	<wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="8" fieldMultiplier="2"/>
       
	<i3dMappings>
		<i3dMapping id="palletTruck_main_component1" node="0>" />
		<i3dMapping id="wheelBackBase" node="0>0|0" />
		<i3dMapping id="wheelBack" node="0>0|0|0" />
		<i3dMapping id="steeringBar" node="0>0|0|1" />
		<i3dMapping id="playerRightHandTarget" node="0>0|0|1|0" />
		<i3dMapping id="playerLeftHandTarget" node="0>0|0|1|1" />
		<i3dMapping id="player" node="0>0|0|1|4" />
		<i3dMapping id="playerNode" node="0>0|0|1|4|0" />
		<i3dMapping id="skeleton" node="0>0|0|1|4|0|0" />
		<i3dMapping id="raycast01" node="0>0|0|1|4|1" />
		<i3dMapping id="raycast02" node="0>0|0|1|4|2" />
		<i3dMapping id="steeringBarCylinder" node="0>0|0|2" />
		<i3dMapping id="wheelsFront" node="0>1" />
		<i3dMapping id="wheelLeft" node="0>1|0" />
		<i3dMapping id="wheelRight" node="0>1|1" />
		<i3dMapping id="cameras" node="0>3" />
		<i3dMapping id="outdoorCameraRot" node="0>3|0" />
		<i3dMapping id="outdoorCamera" node="0>3|0|0" />
		<i3dMapping id="indoorCamera" node="0>3|1" />
		<i3dMapping id="cameraRaycastNode1" node="0>3|2" />
		<i3dMapping id="cameraRaycastNode2" node="0>3|3" />
		<i3dMapping id="visuals" node="0>4" />
		<i3dMapping id="palletTruckBase" node="0>4|0" />
		<i3dMapping id="frontWheel1_left" node="0>4|0|0" />
		<i3dMapping id="frontWheel2_left" node="0>4|0|1" />
		<i3dMapping id="frontWheel1_right" node="0>4|0|2" />
		<i3dMapping id="frontWheel2_right" node="0>4|0|3" />
		<i3dMapping id="palletTruckFork" node="0>4|1" />
		<i3dMapping id="tineCollisionLeft" node="0>4|1|0" />
		<i3dMapping id="tineCollisionRight" node="0>4|1|1" />
		<i3dMapping id="jointNode" node="0>4|1|2" />
		<i3dMapping id="aiCollisionTrigger" node="0>5" />
		<i3dMapping id="enterReferenceNode" node="0>6" />
	</i3dMappings>
</vehicle>