<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="carDynamicMountAttacher">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Mercedes E class</en>
        <de>Mercedes E klasse</de>
    </name>
    <filename>Mercedes.i3d</filename>

    <size width="2.5" length="7.5"/>

    <wheels autoRotateBackSpeed="1.5">
        <wheel rotSpeed="1" restLoad="0.7" tireType="street" repr="0>0" driveNode="0>0|0" radius="0.385" initialCompression="50" suspTravel="0.15" spring="12" damper="10" mass="0.03" hasTyreTracks="true" tyreTrackAtlasIndex="4" />
        <wheel rotSpeed="1" restLoad="0.7" tireType="street" repr="0>1" driveNode="0>1|0" radius="0.385" initialCompression="50" suspTravel="0.15" spring="12" damper="10" mass="0.03" hasTyreTracks="true" tyreTrackAtlasIndex="4" />
        <wheel rotSpeed="0" restLoad="0.7" tireType="street" repr="0>2" driveNode="0>2|0" radius="0.385" initialCompression="50" suspTravel="0.15" spring="12" damper="10" mass="0.03" hasTyreTracks="true" tyreTrackAtlasIndex="4" />
        <wheel rotSpeed="0" restLoad="0.7" tireType="street" repr="0>3" driveNode="0>3|0" radius="0.385" initialCompression="50" suspTravel="0.15" spring="12" damper="10" mass="0.03" hasTyreTracks="true" tyreTrackAtlasIndex="4" />
    </wheels>

    <ackermannSteering rotSpeed="80" rotMax="45" rotCenterWheel1="2" rotCenterWheel2="3" />

    <speedRotScale scale="40" />
    <maxRotatedTimeSpeed value="2"/>

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

    <motor torqueScale="0.95" minRpm="850" maxRpm="4200" brakeForce="1.5" lowBrakeForceScale="0.5" lowBrakeForceSpeedLimit="1" minForwardGearRatio="10" maxForwardGearRatio="35" minBackwardGearRatio="27.5" maxBackwardGearRatio="50">
        <torque normRpm="0.1" torque="0.35"/>
        <torque normRpm="0.2" torque="0.65"/>
        <torque normRpm="0.3" torque="0.85"/>
        <torque normRpm="0.4" torque="1"/>
        <torque normRpm="0.75" torque="0.75"/>
        <torque normRpm="1" torque="0.65"/>
    </motor>

    <fuelCapacity>65</fuelCapacity>
    <fuelUsage>12</fuelUsage>

    <cameras count="2">
        <camera1 index="0>4|0|0" rotatable="true" rotateNode="0>4|0" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="20" />
        <camera2 index="0>4|1" rotatable="true" limit="false" rotMinX="0" rotMaxX="0" transMin="0" transMax="0" useMirror="true" isInside="true" />
    </cameras>

    <lights>
        <light realLight="0>5" decoration="0>6" lightType="0"/>
    </lights>

    <brakeLights>
        <brakeLight index="0>7" />
    </brakeLights>

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

    <mirrors>
        <mirror index="0>13" />
    </mirrors>

    <indoorHud>
        <speed animName="speedDisplay" />
        <rpm   animName="rpmDisplay" />
    </indoorHud>

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

    <attacherJoints>
        <attacherJoint index="0>31" jointType="trailerLow" allowsJointLimitMovement="false" allowsLowering="false" maxRotLimit="10 80 50" maxTransLimit="0 0 0" canTurnOnImplement="false" />
    </attacherJoints>

    <dynamicMountAttacherTrigger triggerNode="0>22" rootNode="0>" jointNode="0>" forceAcceleration="30" />

    <steering index="0>9|0" indoorRotation="270" outdoorRotation="70" />

    <characterNode index="0>11|0" cameraMinDistance="2.0" filename="$dataS2/character/player/player.i3d" characterMesh="1" characterGloves="2" characterSkin="0" spineNode="0|0" leftArmIKChainId="leftArm" rightArmIKChainId="rightArm" spineRotation="180 0 90" >
        <ikChains>
            <ikChain id="rightFoot" target="0>11|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>11|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>9|0|0" targetOffset="0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true" positionThreshold="0.01">
                <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 -40" />
                <rotationNode index="0|0|0|1|0|0|0|0|0" rotation="0 0 -40" />
                <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>9|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 -40" />
                <rotationNode index="0|0|0|2|0|0|0|0|0" rotation="0 0 -40" />
                <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>10" />

    <motorStartSound file="$data/vehicles/steerable/cars/piQup_start.wav" volume="1" pitchOffset="1" />
    <motorSound      file="$data/vehicles/steerable/cars/piQup_idle.wav"  volume="1" pitchOffset="1" pitchScale="0.017" pitchMax="1.75" />
    <motorSoundRun   file="$data/vehicles/steerable/cars/piQup_run.wav"   volume="1"  pitchOffset="0.65"  pitchScale="0.016"  pitchMax="1.75" />
    <motorStopSound  file="$data/vehicles/steerable/cars/piQup_stop.wav"  volume="1"    pitchOffset="0.9" />
    <honkSound       file="$data/vehicles/shared/hornCar.wav"                       volume="1"    radius="70" innerRadius="10" />

    <washable dirtDuration="10" washDuration="1" workMultiplier="4" />

    

    <animations>
        <animation name="speedDisplay">
            <part node="0>16|0" startTime="0" endTime="1" startRot="0 5.5 0" endRot="0 -220.5 0" />
        </animation>
        <animation name="rpmDisplay">
            <part node="0>16|1" startTime="0" endTime="1" startRot="0 32 0" endRot="0 -170 0" />
        </animation>
    </animations>

    <exhaustEffects>
        <exhaustEffect index="0>15|0" 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.3" forwardXRotations="0 0 50" forwardZRotations="0 0 0" steerXRotations="0 0 0" steerZRotations="120 0 -120" />
        <exhaustEffect index="0>15|1" 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.3" forwardXRotations="0 0 50" forwardZRotations="0 0 0" steerXRotations="0 0 0" steerZRotations="120 0 -120" />
    </exhaustEffects>

    <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.5 -0.35" 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" />
    </schemaOverlay>

</vehicle>
