<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="ursus">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <de>Ursus 1604</de>
        <en>Ursus 1604</en>
    </name>
    <filename>U1604.i3d</filename>

    <size width="3.5" length="7"/>

    <wheels autoRotateBackSpeed="1.5">
        <wheel rotSpeed="1" restLoad="2.8" repr="0>0|0" forcePointRatio="0.2" driveNode="0>0|0|0|0" radius="0.62" width="0.52" initialCompression="30" suspTravel="0.05" spring="150" damper="50" mass="0.269" hasTyreTracks="true" />
        <wheel rotSpeed="1" restLoad="2.8" repr="0>1|0" forcePointRatio="0.2" driveNode="0>1|0|0|0" radius="0.62" width="0.52" initialCompression="30" suspTravel="0.05" spring="150" damper="50" mass="0.269" hasTyreTracks="true" />
        <wheel rotSpeed="0" restLoad="2.7" repr="0>2"   forcePointRatio="0.3"                       radius="0.83"  width="0.52" initialCompression="30" suspTravel="0.2" spring="150" damper="50" mass="0.43"  hasTyreTracks="true" />
        <wheel rotSpeed="0" restLoad="2.7" repr="0>3"   forcePointRatio="0.3"                       radius="0.83"  width="0.52" initialCompression="30" suspTravel="0.2" spring="150" damper="50" mass="0.43"  hasTyreTracks="true" />
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="0>0|0|0|0" filename="New/Ratai/ratai.i3d" />
        <dynamicallyLoadedPart node="1" linkNode="0>1|0|0|0" filename="New/Ratai/ratai.i3d" />
        <dynamicallyLoadedPart node="2" linkNode="0>2"     filename="New/Ratai/ratai.i3d" />
        <dynamicallyLoadedPart node="3" linkNode="0>3"     filename="New/Ratai/ratai.i3d" />
    </dynamicallyLoadedParts>

    <ackermannSteering rotSpeed="70" rotMax="30" rotCenterWheel1="2" rotCenterWheel2="3" />

    <differentials>
        <differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="0" wheelIndex2="1" /> <!-- front left-right -->
        <differential torqueRatio="0.5" maxSpeedRatio="1.6" wheelIndex1="2" wheelIndex2="3" /> <!-- back left-right -->
        <differential torqueRatio="0.5" maxSpeedRatio="1.2" differentialIndex1="0" differentialIndex2="1" /> <!-- front-back -->
    </differentials>

    <motor torqueScale="0.651" minRpm="1000" maxRpm="2200" maxBackwardSpeed="15" brakeForce="5.5" lowBrakeForceScale="0.5" lowBrakeForceSpeedLimit="1" minForwardGearRatio="19.5" maxForwardGearRatio="130" minBackwardGearRatio="50" maxBackwardGearRatio="130">
        <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>

    <fuelCapacity>170</fuelCapacity>
    <fuelUsage>20</fuelUsage>

    <cameras count="2">
        <camera1 index="4|0" rotatable="true" rotateNode="4" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="35" >
            <raycastNode index="0>6"/>
            <raycastNode index="0>7"/>
        </camera1>
        <camera2 index="5" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" />
    </cameras>

    <lights>
        <light realLight="0>9"  decoration="0>24|0|0" lightType="0"/>
        <light realLight="0>10" decoration="0>24|1|0" lightType="1"/>
    </lights>

    <brakeLights>
        <brakeLight index="0>24|4" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>24|3|0" />
        <turnSignalRight index="0>24|3|1" />
    </turnSignals>

    <mirrors>
        <mirror index="0>28|0" />
    </mirrors>

    <indoorHud>
        <rpm animName="rpmDisplay" />
        <fuel animName="fuelDisplay" />
    </indoorHud>

    <enterReferenceNode index="0>"/>
    <exitPoint index="0>8"/>

    <attacherJoints>
        <attacherJoint index="0>12|0|0" rotationNode="0>12" minRot="24 0 0" minRot2="-17 0 0" maxRot="5 0 0" rotationNode2="0>12|0" maxRot2="5 0 0" maxTransLimit="0 0.5 0" maxRotLimit="0 0 20" moveTime="2.5" ptoOutputNode="0>15" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d">
            <bottomArm rotationNode="0>13" translationNode="0>13|0" referenceNode="0>13|0|0" zScale="-1" />
			<topArm rotationNode="14" translationNode="14|0|0" referenceNode="14|0|0|0|0" zScale="-1" />
        </attacherJoint>
        <!-- trailer attacher -->
        <attacherJoint index="0>20|0|0"										jointType="trailer"    maxRotLimit="10 50 50" minRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>15" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d"/>
        <attacherJoint index="0>20|1"                                                                      jointType="trailerLow" maxRotLimit="10 50 50" minRotRotationOffset="0" allowsJointLimitMovement="false" ptoOutputNode="0>15" ptoFilename="$data/vehicles/shared/powerTakeoff.i3d"/>
        <attacherJoint index="0>20|2"                                                                      jointType="trailer"    maxRotLimit="10 50 50" minRotRotationOffset="0" allowsJointLimitMovement="false"/>
    </attacherJoints>

    <attacherJointLowerCombo duration="2">
        <attacherJoint index="2" time="0" />
        <attacherJoint index="1" time="1" />
        <attacherJoint index="3" time="1" />
        <attacherJoint index="4" time="1" />
        <attacherJoint index="5" time="0" />
    </attacherJointLowerCombo>

    <movingTools>
        <!-- attacher joint back bottom-->
        <movingTool index="0>13">
            <dependentPart index="0>25" />
        </movingTool>
    </movingTools>

    <movingParts>

        <!-- back -->
        <movingPart index="0>25" referencePoint="0>13|0|1" localReferencePoint="0>25|0" referenceFrame="0>" >
            <dependentPart index="0>25|0" />
        </movingPart>
        <!-- attacher joint back bottom cylinder 2b -->
        <movingPart index="0>25|0" referencePoint="0>13|0|1" referenceFrame="0>13|0|1" >
            <translatingPart index="0>25|0|0" />
            <dependentPart index="0>26" />
        </movingPart>
        <!-- hydraulic -->
        <movingPart index="0>26" referencePoint="0>25|1" referenceFrame="0>27">
            <translatingPart index="0>26|0" />
        </movingPart>
        <movingPart index="0>28|2|6" referencePoint="0>0|0|2" referenceFrame="0>" playSound="false" isActiveDirty="true" >
            <translatingPart index="0>28|2|6|1" />
        </movingPart>

        <!-- steering -->
        <movingPart index="0>0|0|1" referencePoint="0>1|0|1" referenceFrame="0>" scaleZ="true" playSound="false" isActiveDirty="true" />
    </movingParts>

    <animations>
        <animation name="rpmDisplay">
            <part node="0>28|2|16|0" startTime="0" endTime="0.27" startRot="0 0 0" endRot="0 0 0" />
            <part node="0>28|2|16|0" startTime="0.27" endTime="1"    startRot="0 0 0" endRot="0 -165 0" />
			
			<part node="0>28|2|0|2|0" startTime="0" endTime="1" startRot="0 0 0" endRot="45 -21 0" />
        </animation>
        <animation name="fuelDisplay">
            <part node="0>28|2|16|4" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -60 0" />
        </animation>
    </animations>
	
	       <animParts>
       <animPart index="0>28|2|2|0" id="DoorFL" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="0 60 0" moveTime="0.5" />
        <animPart index="0>28|2|1|0" id="DoorFR" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="0 -60 0" moveTime="0.5" />
	     <animPart index="0>28|2|3|0" id="WindFL" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="25 0 0" moveTime="0.5" />
	   	  <animPart index="0>28|2|0|3" id="handb" showHelp="false" autoReturn="false" rotMin="-40 0 0" rotMax="0 0 0" moveTime="1" />
		   <animPart index="0>28|2|23|1" id="stog" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="-6.5 0 0" moveTime="0.5" />
            <animPart index="0>28|2|23|0" id="stog" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="56 0 0" moveTime="0.5" />
	         <animPart index="0>28|2|23|0|0|0" id="stog" showHelp="false" autoReturn="false" rotMin="0 0 0" rotMax="-76 0 0" moveTime="0.5" />
			  <animPart index="0>28|2|14|0" id="TORMOZ" showHelp="false" autoReturn="true" rotMin="0 0 0" rotMax="30 0 0" moveTime="0.1" />
    </animParts>
	
    <steering index="0>11|0" indoorRotation="540" outdoorRotation="50" />

    <characterNode index="0>21|0" cameraMinDistance="1.5" filename="$dataS2/character/player/player.i3d" characterMesh="1" characterGloves="2" characterSkin="0" spineNode="0|0" leftArmIKChainId="leftArm" rightArmIKChainId="rightArm" spineRotation="180 0 108" >
        <ikChains>
            <ikChain id="rightFoot" target="0>21|1" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true" >
                <node index="0|1" />
                <node index="0|1|0"     minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0"   maxRz="90" />
                <node index="0|1|0|0"   minRx="0" maxRx="0" minRy="0"   maxRy="0"  minRz="-100" maxRz="-7" />
                <node index="0|1|0|0|0" />
            </ikChain>
            <ikChain id="leftFoot" target="0>21|2" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true">
                <node index="0|2"     />
                <node index="0|2|0"     minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0"   maxRz="90" />
                <node index="0|2|0|0"   minRx="0" maxRx="0" minRy="0"   maxRy="0"  minRz="-100" maxRz="-7" />
                <node index="0|2|0|0|0" />
            </ikChain>
            <ikChain id="rightArm" target="0>11|0|0" targetOffset="0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
                <node index="0|0|0|1" />
                <node index="0|0|0|1|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
                <node index="0|0|0|1|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7"   maxRz="130" />
                <node index="0|0|0|1|0|0|0" />
                <rotationNode index="0|0|0|1|0|0|0|0" rotation="0 0 -60" />
                <rotationNode index="0|0|0|1|0|0|0|0|0" rotation="0 0 -60" />
                <rotationNode index="0|0|0|1|0|0|0|1" rotation="-90 20 -40" />
                <rotationNode index="0|0|0|1|0|0|0|1|0" rotation="0 0 -40" />
            </ikChain>
            <ikChain id="leftArm" target="0>11|0|1" targetOffset="-0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
                <node index="0|0|0|2" />
                <node index="0|0|0|2|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
                <node index="0|0|0|2|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7"   maxRz="130" />
                <node index="0|0|0|2|0|0|0" />
                <rotationNode index="0|0|0|2|0|0|0|0" rotation="0 0 -60" />
                <rotationNode index="0|0|0|2|0|0|0|0|0" rotation="0 0 -60" />
                <rotationNode index="0|0|0|2|0|0|0|1" rotation="-90 20 -40" />
                <rotationNode index="0|0|0|2|0|0|0|1|0" rotation="0 0 -40" />
            </ikChain>
        </ikChains>
    </characterNode>

    <aiTrafficCollisionTrigger index="0>22" />

    <exhaustEffects>
        <exhaustEffect index="0>23" filename="$data/vehicles/particleAnimations/shared/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.05" maxRpmColor="0.9 0.9 0.9 0.2" minRpmScale="0.05" maxRpmScale="0.4" forwardXRotations="0 0 0" forwardZRotations="200 0 -80" steerXRotations="-50 0 -50" steerZRotations="-250 0 200" />
    </exhaustEffects>

    <motorStartDuration>2000</motorStartDuration>
    <attachSound file="$data/vehicles/shared/attach.wav" pitchOffset="1" />
    <motorStartSound file="Sounds/start.wav" pitchOffset="0.8" volume="0.8" />
    <motorSound file="Sounds/silnik.wav" pitchOffset="0.8" pitchScale="0.025" pitchMax="1.4" volume="0.8" radius="50" innerRadius="20" />
    <motorSoundRun file="Sounds/obroty.wav" pitchOffset="1" pitchScale="0.025" pitchMax="1" volume="1" />
	<motorSoundRun2 file="$data/vehicles/shared/transmissionSDF.wav" pitchOffset="0.65" volume="0.125" pitchMax="1.275" volumeMax="0.75"/>
    <motorStopSound file="Sounds/stop.wav" pitchOffset="1" volume="1.15" />
    <compressedAirSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.25"/>
    <compressionSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.5"/>
    <hydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.55" volume="0.8" />

    <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="1">
        <component1 centerOfMass="0 0.98 0.55" solverIterationCount="10" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/vehicleSchema.png" fileSelected="$dataS2/menu/schemas/vehicleSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0.5 0">
        <attacherJoint position="1 0" rotation="0" invertX="false" />
        <attacherJoint position="0 0" rotation="0" invertX="true" />
        <attacherJoint position="1 0" rotation="0" invertX="false" />
        <attacherJoint position="1 0" rotation="0" invertX="false" />
        <attacherJoint position="0 0" rotation="0" invertX="true" />
    </schemaOverlay>

	<dach    index="0>28|2|23|1" minRot="0 0 0" maxRot="-6.5 0 0" rotTime="2.0" touchRotLimit="10"/>
	<dach1    index="0>28|2|23|0" minRot="0 0 0" maxRot="56 0 0" rotTime="2.0" touchRotLimit="10"/>
	<dach2    index="0>28|2|23|0|0|0" minRot="0 0 0" maxRot="-76 0 0" rotTime="2.0" touchRotLimit="10"/>
	
</vehicle>
