﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="trailer_mouseControlled">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Bergmann HTW 65</en>
        <de>Bergmann HTW 65</de>
    </name>
	<typeDesc>$l10n_TypeDesc_ForageWagon</typeDesc>
    <filename>data/vehicles/trailers/bergmann/bergmannHTW65.i3d</filename>

    <size width="3.5" length="12.5"/>

    <wheels autoRotateBackSpeed="2.0">
        <wheel driveMode="0" repr="0" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" steeringAxleScale="0.3" steeringAxleRotMax="10" steeringAxleRotMin="-10" lateralStiffness="1" />
        <wheel driveMode="0" repr="1" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" steeringAxleScale="0.3" steeringAxleRotMax="10" steeringAxleRotMin="-10" lateralStiffness="1" />
        <wheel driveMode="0" repr="2" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" lateralStiffness="1" />
        <wheel driveMode="0" repr="3" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" lateralStiffness="1" />
        <wheel driveMode="0" repr="4" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" steeringAxleScale="-0.7" steeringAxleRotMax="25" steeringAxleRotMin="-25" lateralStiffness="1" />
        <wheel driveMode="0" repr="5" radius="0.67" deltaY="0.13" suspTravel="0.2" spring="10" damper="20" mass="0.1" steeringAxleScale="-0.7" steeringAxleRotMax="25" steeringAxleRotMin="-25" lateralStiffness="1" />
    </wheels>
    <brakeForce>3</brakeForce>
	<downForce>7</downForce>
    <steeringAxleAngleScale startSpeed="5" endSpeed="90" />

    <lights count="1">
        <light1 index="8" />
    </lights>

	<lightCoronas>
		<lightCorona index="17" />
	</lightCoronas>

	<brakeLights>
		<brakeLight index="0>21" />
	</brakeLights>

    <fillPlanes>
        <fillPlane type="chaff">
            <node index="9|0">
                <key time="0" y="1.546" scale="0.9 0.05 1"/>
                <key time="0.1" y="1.546" scale="0.99 0.1 1"/>
                <key time="0.2" y="1.546" scale="0.99 0.2 1"/>
                <key time="0.5" y="1.546" scale="0.99 0.5 1"/>
                <key time="1" y="1.546" scale="0.99 1 1"/>
            </node>
			<node index="16">
				<key time="0" scale="0.8 0.01 1"/>
				<key time="1" scale="0.8 1.2 1"/>
			</node>
        </fillPlane>
		<fillPlane type="grass_windrow">
            <node index="9|1">
                <key time="0" y="1.546" scale="0.9 0.05 1"/>
                <key time="0.1" y="1.546" scale="0.99 0.1 1"/>
                <key time="0.2" y="1.546" scale="0.99 0.2 1"/>
                <key time="0.5" y="1.546" scale="0.99 0.5 1"/>
                <key time="1" y="1.546" scale="0.99 1 1"/>
            </node>
			<node index="16">
				<key time="0" scale="0.8 0.01 1"/>
				<key time="1" scale="0.8 1.2 1"/>
			</node>
        </fillPlane>
    </fillPlanes>

	<massPerFillLevel value="0.00005" />
    <capacity>55500</capacity>

    <hydraulicSound file="data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="1.0" volume="1.0" />
    <fillSound file="data/maps/sounds/siloFillSound.wav" pitchOffset="1.0" volume="1.5" />

    <attacherJoint index="6" jointType="trailerLow"/>
	<powerTakeoffInput index="0>20" rotSpeed="0" />

    <fillRootNode index="0>" />
    <exactFillRootNode index="10" />
    <fillAutoAimTargetNode index="11" />
    <fillMassNode index="0>" />

	<tipReferencePoints>
        <tipReferencePoint index="0>7" width="2.5" />
    </tipReferencePoints>
	
	<tipAnimations>
        <tipAnimation speedScale="1" animationName="tipAnimationBack" dischargeStartTime="1.0" dischargeEndTime="25" >
            <dischargeParticleSystems>
				<dischargeParticleSystem type="chaff" node="0>16" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigChaff.i3d" />
				<dischargeParticleSystem type="grass_windrow" node="0>16" position="0 0 0" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDPSBigGrass.i3d" />
            </dischargeParticleSystems>
        </tipAnimation>
    </tipAnimations>
	
    <fillTypes fruitTypes="chaff grass_windrow"/>

	<mouseControls>
        <mouseControl iconFilename="dataS2/menu/mouseControlsHelp/bergmannHTW65_chaffLid.png" mouseButton="LEFT" mouseAxis="Y" axis="AXIS_FRONTLOADER_ARM" />
    </mouseControls>

    <movingTools>
        <!-- chaffLid -->
		<movingTool index="18" anchorActor="0" rotSpeed="50" rotAcceleration="160" rotMax="75" rotMin="0" axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="false" speedFactor="0.3" rotationAxis="1" translationAxis="2" >
            <dependentPart index="0>19" />
        </movingTool>
		
		<movingTool index="0>13">
			<dependentPart index="0>14" />
		</movingTool>
    </movingTools>

	<movingParts>
		<!-- chaffLid hydraulics-->
        <movingPart index="0>19" referencePoint="0>18|0" referenceFrame="0>19">
			<translatingPart index="0>19|0" />
        </movingPart>
		
		<movingPart index="0>14" referencePoint="0>13|0" referenceFrame="0>22">
			<translatingPart index="0>14|0" />
        </movingPart>
	</movingParts>

    <animations>
        <!-- move support wheel down/up-->
        <animation name="moveSupport">
            <part node="12" startTime="0" duration="1" startRot="0 0 0" endRot="24 0 0" />
            <part node="12|0" startTime="0" duration="1" startRot="0 0 0" endRot="-24 0 0" />
        </animation>
		
		<!-- backtipping -->
		<animation name="tipAnimationBack">
			<part node="0>13" startTime="0" endTime="4" startRot="0 0 0" endRot="90 0 0" />
        </animation>
    </animations>

    <support animationName="moveSupport" />

    <tipRotationNodes>
        <tipRotationNode index="15|0" rotSpeed="880"/>
        <tipRotationNode index="15|1" rotSpeed="880"/>
    </tipRotationNodes>

    <components count="1">
        <component1 centerOfMass="0 0 -2.2" solverIterationCount="8" />
    </components>

    <schemaOverlay file="data/vehicles/schemas/implementSchema.png" fileSelected="data/vehicles/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
