﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="forwarderTrailerSteerable">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Stepa FHL 13 AK</en>
        <de>Stepa FHL 13 AK</de>
    </name>
    <typeDesc>$l10n_TypeDesc_TimberTrailer</typeDesc>
    <filename>data/vehicles/trailers/stepa/stepaFHL13AK.i3d</filename>

    <size width="3" length="7.0" />

    <wheels autoRotateBackSpeed="2.0">
        <wheel  restLoad="0.6" repr="0>0"                   radius="0.437" width="0.4" initialCompression="40" suspTravel="0.1" spring="20" damper="30" mass="0.05" />
        <wheel  restLoad="0.6" repr="0>1" driveNode="0>1|0" radius="0.437" width="0.4" initialCompression="40" suspTravel="0.1" spring="20" damper="30" mass="0.05" />
        <wheel  restLoad="0.9" repr="0>2"                   radius="0.437" width="0.4" initialCompression="40" suspTravel="0.1" spring="20" damper="30" mass="0.05" hasTyreTracks="true" tyreTrackAtlasIndex="3"/>
        <wheel  restLoad="0.9" repr="0>3"                   radius="0.437" width="0.4" initialCompression="40" suspTravel="0.1" spring="20" damper="30" mass="0.05" hasTyreTracks="true" tyreTrackAtlasIndex="3"/>
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="0>0"   filename="$data/vehicles/wheels/trelleborg/trelleborgT404_400_60_15_5.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>1|0" filename="$data/vehicles/wheels/trelleborg/trelleborgT404_400_60_15_5.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="0>2"   filename="$data/vehicles/wheels/trelleborg/trelleborgT404_400_60_15_5.i3d" />
        <dynamicallyLoadedPart node="1|1" linkNode="0>3"   filename="$data/vehicles/wheels/trelleborg/trelleborgT404_400_60_15_5.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>1|1|0"  filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>1|1|1"  filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>4|11|0" filename="$data/vehicles/shared/wheelChock01.i3d" />
        <dynamicallyLoadedPart node="0" linkNode="0>4|11|1" filename="$data/vehicles/shared/wheelChock01.i3d" />
    </dynamicallyLoadedParts>

    <brakeForce>0.5</brakeForce>

    <cameras count="2">
        <camera1 index="0>4|14|0" rotatable="true" rotateNode="0>4|14" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="18" >
            <!--raycastNode index="0>6"/>
            <raycastNode index="0>7"/-->
        </camera1>
        <camera2 index="0>4|8|4|0" rotatable="false" useWorldXZRotation="false" limit="true" rotMinX="-1.1" rotMaxX="1.1" transMin="0" transMax="0" />
    </cameras>

    <enterReferenceNode index="0>6"/>
    <exitPoint index="0>5"/>
    <characterNode index="0>4|8|2"/>

    <cylinderedHydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.75" volume="0.6" />

    <lights>
        <light decoration="0>4|3|1" lightType="0"/>
        <light realLight="0>4|8|0|0|4|0" decoration="0>4|8|0|0|4|1" lightType="1"/>
    </lights>

    <brakeLights>
        <brakeLight index="0>4|3|2" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>4|3|3|0" />
        <turnSignalRight index="0>4|3|3|1" />
    </turnSignals>

    <inputAttacherJoints>
        <inputAttacherJoint index="0>4|0|0" jointType="trailerLow" indexPTO="0>4|0|5" />
    </inputAttacherJoints>

    <mouseControls>
        <mouseControl iconFilename="$dataS2/menu/moveControls/arm1_rotX.png"  axis="AXIS_FRONTLOADER_ARM" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/arm1_rotY.png"  axis="AXIS_FRONTLOADER_TOOL" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/arm2_rot.png"   axis="AXIS_FRONTLOADER_ARM2" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/arm2_trans.png" axis="AXIS_FRONTLOADER_TOOL2" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/grab_rotY.png"  axis="AXIS_FRONTLOADER_TOOL3" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/grab_rotX.png"  axis="AXIS_FRONTLOADER_TOOL4" />
        <mouseControl iconFilename="$dataS2/menu/moveControls/drawbar.png"    axis="AXIS_FRONTLOADER_TOOL5" />
    </mouseControls>

    <movingTools>
        <!-- attacher bar -->
        <movingTool index="0>4|0" inputAttacherJoint="true" rotSpeed="20" rotAcceleration="170" rotMax="40" rotMin="-40" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL5" invertAxis="true"  mouseAxis="AXIS_FRONTLOADER_TOOL5" invertMouseAxis="true" speedFactor="1" >
            <dependentPart index="0>4|1" />
            <dependentPart index="0>4|2" />
            <dependentPart index="0>4|0|2" />
        </movingTool>
        
        <!-- physics -->
        <!-- main arm -->
        <movingTool index="0>4|15" componentJointIndex="0" anchorActor="0" rotSpeed="20" rotAcceleration="170" rotMax="160" rotMin="-160" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL" invertAxis="true"  mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="true" speedFactor="1" rotSendNumBits="11">
        </movingTool>
        <!-- second arm -->
        <movingTool index="0>4|15|0" componentJointIndex="0" anchorActor="0" rotSpeed="20" rotAcceleration="170" rotMax="0" rotMin="-110" rotationAxis="1" axis="AXIS_FRONTLOADER_ARM" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="1" rotSendNumBits="10">
        </movingTool>
        <!-- third arm -->
        <movingTool index="0>4|15|0|0" componentJointIndex="0" anchorActor="0" rotSpeed="20" rotAcceleration="170" rotMax="77" rotMin="-69.54" rotationAxis="1" axis="AXIS_FRONTLOADER_ARM2" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="1" rotSendNumBits="10">
        </movingTool>
        <!-- fourth arm -->
        <movingTool index="0>4|15|0|0|0" componentJointIndex="0" anchorActor="0" transSpeed="0.7" transAcceleration="1.8" transMax="-0.78" transMin="-2.48" translationAxis="3" axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL2" invertMouseAxis="false" speedFactor="1" >
        </movingTool>
        <movingTool index="0>4|15|0|0|0|0" componentJointIndex="0" anchorActor="0" transSpeed="0.7" transAcceleration="1.8" transMax="0" transMin="-1.7" translationAxis="3" axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL2" invertMouseAxis="false" speedFactor="1">
        </movingTool>
        
        <!-- delayed meshes -->
        <!-- main arm -->
        <movingTool index="0>4|8" isDelayed="true" adjustAttributesToMovingToolIndex="2" rotSpeed="20" rotAcceleration="170" rotMax="160" rotMin="-160" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL" invertAxis="true"  mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="true" speedFactor="1" rotSendNumBits="11">
        </movingTool>
        <!-- second arm -->
        <movingTool index="0>4|8|0" isDelayed="true" adjustAttributesToMovingToolIndex="3" rotSpeed="20" rotAcceleration="170" rotMax="0" rotMin="-110" rotationAxis="1" axis="AXIS_FRONTLOADER_ARM" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="1" rotSendNumBits="10">
            <dependentPart index="0>4|8|1" />
        </movingTool>
        <!-- third arm -->
        <movingTool index="0>4|8|0|0" isDelayed="true" adjustAttributesToMovingToolIndex="4" rotSpeed="20" rotAcceleration="170" rotMax="77" rotMin="-69.54" rotationAxis="1" axis="AXIS_FRONTLOADER_ARM2" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="1" rotSendNumBits="10">
            <dependentPart index="0>4|8|0|1" />
        </movingTool>
        <!-- fourth arm -->
        <movingTool index="0>4|8|0|0|0" isDelayed="true" adjustAttributesToMovingToolIndex="5" transSpeed="0.7" transAcceleration="1.8" transMax="-0.78" transMin="-2.48" translationAxis="3" axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL2" invertMouseAxis="false" speedFactor="1" >
            <dependentPart index="0>4|8|0|0|0|1" />
        </movingTool>
        <movingTool index="0>4|8|0|0|0|0" isDelayed="true" adjustAttributesToMovingToolIndex="6" transSpeed="0.7" transAcceleration="1.8" transMax="0" transMin="-1.7" translationAxis="3" axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL2" invertMouseAxis="false" speedFactor="1">
        </movingTool>

        <!-- claw rotation -->
        <movingTool index="1>2" componentJointIndex="0" anchorActor="1" rotSpeed="-80" rotAcceleration="160" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL3" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL3" invertMouseAxis="true" speedFactor="1"/>
        
        <!-- left/right claw -->
        <movingTool index="1>0" componentJointIndex="1" anchorActor="0" rotSpeed="80" rotAcceleration="160" rotMax="0" rotMin="-100" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_TOOL4" invertMouseAxis="false" speedFactor="1">
        </movingTool>
        <movingTool index="1>1" componentJointIndex="2" anchorActor="0" rotSpeed="-80" rotAcceleration="160" rotMax="100" rotMin="0" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="false"  mouseAxis="AXIS_FRONTLOADER_TOOL4" invertMouseAxis="false" speedFactor="1">
        </movingTool>

        <movingTool index="0>4|4">
            <dependentPart index="0>4|6" />
        </movingTool>
        <movingTool index="0>4|5">
            <dependentPart index="0>4|7" />
        </movingTool>
   </movingTools>

    <movingParts>
        <movingPart index="0>4|0|2" referencePoint="0>4|12" referenceFrame="0>" scaleZ="true" playSound="false" />
        <movingPart index="0>4|1" referencePoint="0>4|0|3" referenceFrame="0>" playSound="false" >
            <translatingPart index="0>4|1|0" />
        </movingPart>
        <movingPart index="0>4|2" referencePoint="0>4|0|4" referenceFrame="0>" playSound="false"  >
            <translatingPart index="0>4|2|0" />
        </movingPart>

        <movingPart index="0>4|8|1" referencePoint="0>4|8|0|3" referenceFrame="0>4|8|3" >
            <translatingPart index="0>4|8|1|0" />
        </movingPart>

        <movingPart index="0>4|8|0|1" localReferencePoint="0>4|8|0|1|0" referencePoint="0>4|8|0|0|2" referenceFrame="0>4|8|0|0" >
            <dependentPart index="0>4|8|0|1|0" />
            <dependentPart index="0>4|8|0|2" />
        </movingPart>
        <movingPart index="0>4|8|0|1|0" referencePoint="0>4|8|0|0|2" referenceFrame="0>4|8|0|0|2" scaleZ="true" playSound="false" />
        <movingPart index="0>4|8|0|2" referencePoint="0>4|8|0|1|0" referenceFrame="0>4|8|0|4" playSound="false" >
            <translatingPart index="0>4|8|0|2|0" />
        </movingPart>
        <!-- rope -->
        <movingPart index="0>4|8|0|0|0|1" referencePoint="0>4|8|0|0|1" referenceFrame="0>4|8|0|0|1" scaleZ="true" />

        <!-- claw-arm connection -->
        <movingPart index="0>4|8|0|0|0|0|1" referencePoint="1>4" referenceFrame="0>4|8|0|0|0|0|2" limitedAxis="1" isActiveDirty="true" playSound="false">
            <dependentPart index="0>4|8|0|0|0|0|1|0" />
        </movingPart>
        <movingPart index="0>4|8|0|0|0|0|1|0" referencePoint="1>4" referenceFrame="0>4|8|0|0|0|0|1|1" limitedAxis="1" playSound="false" >
            <dependentPart index="0>4|8|0|0|0|0|1|0|0|0" />
        </movingPart>

        <!-- visible claw root -->
        <movingPart index="0>4|8|0|0|0|0|1|0|0|0" referencePoint="1>3" referenceFrame="0>4|8|0|0|0|0|1|0|0" limitedAxis="2" playSound="false">
            <dependentPart index="0>4|8|0|0|0|0|1|0|0|0|0" />
        </movingPart>

        <!-- claws -->
        <movingPart index="0>4|8|0|0|0|0|1|0|0|0|0" referencePoint="2>4" referenceFrame="2>4" playSound="false" limitedAxis="3" >
            <dependentPart index="0>4|8|0|0|0|0|1|0|0|0|1"/>
        </movingPart>
        <movingPart index="0>4|8|0|0|0|0|1|0|0|0|1" referencePoint="3>4" referenceFrame="3>4" playSound="false" limitedAxis="3" >
            <dependentPart index="0>4|8|0|0|0|0|1|0|0|0|0|1"/>
            <dependentPart index="0>4|8|0|0|0|0|1|0|0|0|0|0"/>
        </movingPart>
        <!-- claw cylinder arm -->
        <movingPart index="0>4|8|0|0|0|0|1|0|0|0|0|1" referencePoint="0>4|8|0|0|0|0|1|0|0|0|1|0" referenceFrame="0>4|8|0|0|0|0|1|0|0|0" scaleZ="true" playSound="false"/>
        <!-- claw cylinder -->
        <movingPart index="0>4|8|0|0|0|0|1|0|0|0|0|0" referencePoint="0>4|8|0|0|0|0|1|0|0|0|1|1" referenceFrame="0>4|8|0|0|0|0|1|0|0|0" playSound="false">
            <translatingPart index="0>4|8|0|0|0|0|1|0|0|0|0|0|0" />
        </movingPart>

        <!-- move pillars down/up -->
        <movingPart index="0>4|6" referencePoint="0>4|4|0" referenceFrame="0>4|4|0">
            <translatingPart index="0>4|6|0" />
        </movingPart>
        <movingPart index="0>4|7" referencePoint="0>4|5|0" referenceFrame="0>4|5|0">
            <translatingPart index="0>4|7|0" />
        </movingPart>

        <!-- camera -->
        <movingPart index="0>4|8|4" referencePoint="0>4|8|0|0|0|0|3" referenceFrame="0>" invertZ="true" isActiveDirty="true" />

    </movingParts>

    <animations>
        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="0>1|1"   startTime="0"    endTime="0.05" visibility="false" />
            <part node="0>4|11"  startTime="0"    endTime="0.05" visibility="true" />
            <part node="0>1|1"   startTime="0.05" endTime="0.1"  visibility="true" />
            <part node="0>4|11"  startTime="0.05" endTime="0.1"  visibility="false" />
            <part node="0>4|0|1" startTime="0"    endTime="0.3" startTrans="0 -0.015 0.27" endTrans="0 -0.442 0.27" />
        </animation>

        <!-- move pillars down/up -->
        <animation name="movePillars">
            <part node="0>4|4" startTime="0" endTime="1.0" startRot="0 0 0" endRot="0 0 -105" />
            <part node="0>4|5" startTime="0" endTime="1.0" startRot="0 0 0" endRot="0 0 105" />
        </animation>
    </animations>

    <support animationName="moveSupport" />

    <foldingParts posDirectionText="unfold_SupportFeet" negDirectionText="fold_SupportFeet" >
        <foldingPart animationName="movePillars" speedScale="1" />
    </foldingParts>

    <washable dirtDuration="90" washDuration="1" workMultiplier="4" />

    <driveGroundParticleSystems>
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="1" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="2" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="3" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="4" />
    </driveGroundParticleSystems>

    <components count="4">
        <component1 centerOfMass="0 0.4 -1.8" solverIterationCount="20" /> <!-- main -->
        <component2 centerOfMass="0 -0.1 0" solverIterationCount="15" /> <!-- claw -->
        <component3 centerOfMass="0 0 0" solverIterationCount="15" /> <!-- claw left -->
        <component4 centerOfMass="0 0 0" solverIterationCount="15" /> <!-- claw right -->

        <!-- claw base -->
        <joint component1="0" component2="1" index="0>4|15|0|0|0|0|0" indexActor1="1>2|0" zRotationNode="0>4|15|0|0|0|0|0|0" enableCollision="true" rotLimit="0 70 70" transLimit="0 0 0" rotDriveVelocity="0 0 0" maxRotDriveForce="0.4 0.4 0.4" transLimitSpring="9 9 9" transLimitDamping="4 4 4"  />
        <!-- left/right claw -->
        <joint component1="1" component2="2" index="1>0" enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 0 0.6" rotLimitDamping="0 0 1" />
        <joint component1="1" component2="3" index="1>1" enableCollision="false" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 0 0.6" rotLimitDamping="0 0 1" />

        <collisionPair component1="2" component2="3" enabled="false" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
