Advertisement
Guest User

Untitled

a guest
Apr 11th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.84 KB | None | 0 0
  1. /// PhysX part
  2. simulation          = tankX;
  3. engineBrakeCoef     = 0.1;
  4. torqueCurve[] = {
  5. {0 , 0},
  6. {0.14 , 0.07},
  7. {0.29 , 0.12},
  8. {0.43 , 0.17},
  9. {0.57 , 0.17},
  10. {0.71 , 0.17},
  11. {0.86 , 0.15},
  12. {1 , 0.12},
  13. };
  14.  
  15.  
  16.  
  17. //maxOmega = 251.33;
  18. maxOmega = 420.33;
  19. enginePower = 280;
  20. peakTorque = 2311;
  21.  
  22. thrustDelay         = 0.3;      /// how much time does it take to get the full thrust (default 1), used to reduce initial wheel slipping
  23. clutchStrength      = 15;
  24. fuelCapacity        = 1885;
  25. brakeIdleSpeed      = 1.78;     /// speed in m/s below which braking is applied
  26. latency             = 2.0;
  27. tankTurnForce       = 201710; /// Random magic number, expected to be something like 11 x mass of vehicle (was 101710 before guy played with it...)
  28. normalSpeedForwardCoef = 0.82;
  29. switchTime = 0.41;
  30.  
  31. /// Gearbox and transmission
  32. idleRpm = 600; // RPM at which the engine idles.
  33. redRpm = 4200; // RPM at which the engine redlines.
  34.  
  35. engineLosses = 35; // power losses on the engine's crank-shaft (before the gearbox) in Nm. (Multiplied by the gear ratio)
  36. transmissionLosses = 25; // power losses on wheel axis (in/after the gearbox) in Nm. (Constant)
  37. numberPhysicalWheels = 12;
  38.  
  39. class complexGearbox {
  40.     GearboxRatios[]    = {
  41.        
  42.                             "R2",-5.9,
  43.                             "N",0,
  44.                             "D1",5.9,
  45.                             "D2",4.6,
  46.                             "D3",2.75,
  47.                             "D4",1.5,
  48.                             "D5",1.3
  49.                         };
  50.                        
  51.     TransmissionRatios[] = {
  52.                                 "High",15
  53.                             };
  54.                            
  55.     gearBoxMode        = "auto"; //gearbox can be of type: full-auto (only requires 'W' or 'S'), auto (requires shift between drive and reverse), semi-auto, manual
  56.     moveOffGear        = 1; // defines what gear an automatic or semi-automatic gearbox will move off from stationary in. 1 by default.
  57.     driveString        = "D"; // string to display in the HUD for forward gears.
  58.     neutralString      = "N"; // string to display in the HUD for neutral gear.
  59.     reverseString      = "R"; // string to display in the HUD for reverse gears.
  60.     transmissionDelay  = 0.1;
  61.    
  62.     gearUpMaxCoef = 0.9;
  63.     gearUpMinCoef = 0.7;
  64.     gearDownMaxCoef = 0.75;
  65.     gearDownMinCoef = 0.7;
  66. };
  67. /// end of gearbox
  68.  
  69. class Wheels {
  70.     class L2 {
  71.         boneName = "track_L1";
  72.         center   = "wheel_1_2_axis";
  73.         boundary = "wheel_1_2_bound";
  74.         damping  = 50.0;
  75.         // tanks do not have steerable wheels
  76.         steering = 0;
  77.         /// We need to distinguish the side to apply the right thrust value
  78.         side = "left";
  79.         /// weight of the wheel is defined per wheel, it reduces overall mass of vehicle
  80.         weight = 50;
  81.         mass = 150;
  82.         MOI = 25;
  83.         latStiffX = 25;
  84.         latStiffY = 280;
  85.         longitudinalStiffnessPerUnitGravity = 100000;
  86.         maxBrakeTorque = 10000;
  87.         sprungMass = 2940.0;
  88.         springStrength = 73500;
  89.         springDamperRate = 11760;
  90.         dampingRate = 0.8;
  91.         dampingRateInAir = 8830.0;
  92.         dampingRateDamaged = 10.0;
  93.         dampingRateDestroyed = 10000.0;
  94.         maxDroop = 0.20;
  95.         maxCompression = 0.1;
  96.     };
  97.     class L3: L2 {
  98.         boneName = "track_L2";
  99.         center   = "wheel_1_3_axis";
  100.         boundary = "wheel_1_3_bound";
  101.     };
  102.     class L4: L2 {
  103.         boneName = "track_L3";
  104.         center   = "wheel_1_4_axis";
  105.         boundary = "wheel_1_4_bound";
  106.     };
  107.     class L5: L2 {
  108.         boneName = "track_L4";
  109.         center   = "wheel_1_5_axis";
  110.         boundary = "wheel_1_5_bound";
  111.     };
  112.     // rear left wheel, usually Idler or Drive Sproket
  113.     // Note, this wheel may not always be touching the ground, but we need it anyway!
  114.     class L6: L2 {
  115.         boneName = "track_L5";
  116.         center   = "wheel_1_6_axis";
  117.         boundary = "wheel_1_6_bound";
  118.     };
  119.     // front left wheel, usually Idler or Drive Sproket
  120.     // Note, this wheel may not always be touching the ground, but we need it anyway!
  121.     class L1: L2 {
  122.         boneName = "track_Lfront";
  123.         center   = "wheel_1_1_axis";
  124.         boundary = "wheel_1_1_bound";
  125.         sprungMass = 1500.0;
  126.         springStrength = 37500;
  127.         springDamperRate = 1;
  128.         maxDroop = 0;
  129.         maxCompression = 0;
  130.     };
  131.  
  132.     class R2: L2 {
  133.         boneName = "track_R1";
  134.         center   = "wheel_2_2_axis";
  135.         boundary = "wheel_2_2_bound";
  136.         side = "right";
  137.     };
  138.     class R3: R2 {
  139.         boneName = "track_R2";
  140.         center   = "wheel_2_3_axis";
  141.         boundary = "wheel_2_3_bound";
  142.     };
  143.     class R4: R2 {
  144.         boneName = "track_R3";
  145.         center   = "wheel_2_4_axis";
  146.         boundary = "wheel_2_4_bound";
  147.     };
  148.     class R5: R2 {
  149.         boneName = "track_R4";
  150.         center   = "wheel_2_5_axis";
  151.         boundary = "wheel_2_5_bound";
  152.     };
  153.     // rear right wheel, usually Idler or Drive Sproket
  154.     // Note, this wheel may not always be touching the ground, but we need it anyway!
  155.     class R6: R2 {
  156.         boneName = "track_R5";
  157.         center   = "wheel_2_6_axis";
  158.         boundary = "wheel_2_6_bound";
  159.     };
  160.     // front right wheel, usually Idler or Drive Sproket
  161.     // Note, this wheel may not always be touching the ground, but we need it anyway!
  162.     class R1: R2 {
  163.         boneName = "track_Lfront";
  164.         center   = "wheel_2_1_axis";
  165.         boundary = "wheel_2_1_bound";
  166.         sprungMass = 1500.0;
  167.         springStrength = 37500;
  168.         springDamperRate = 7500;
  169.         maxDroop = 0;
  170.         maxCompression = 0;
  171.     };
  172. };
  173. /// End of PhysX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement