Vehicle Controller


Test Test2

File Info

Filename vehicleController.lua
Path /lua/vehicle/controller/vehicleController.lua
Type Main
Multiple Usage Not supported

Jbeam Properties

Name Default Unit Description
gearboxDecisionSmoothingDown 2 number  
gearboxDecisionSmoothingUp 5 number  
wheelSlipShiftUpSmoothingIn 10 number  
wheelSlipShiftUpSmoothingOut 20 number  
aggressionSmoothingUp 1.5 number  
aggressionSmoothingDown 0.15 number  
useSmartAggressionCalculation true bool  
wheelSlipUpThreshold 7000 number  
wheelSlipDownThreshold 10000 number  
lowShiftDownRPM 2000 array<number>  
highShiftDownRPM 3500 array<number>  
lowShiftUpRPM 2500 array<number>  
highShiftUpRPM 5000 array<number>  
calculateOptimalLoadShiftPoints false bool  
shiftDownRPMOffsetCoef 1.3 number  
transmissionShiftDelay 0.2 number  
transmissionGearChangeDelay 0.5 number  
neutralSelectionDelay 0.5 number  
aggressionHoldOffThrottleDelay 2.25 number  
shiftLogicName   string  

Public Functions

Function name Parameters Description
shiftUp()   Shift up one gear or gear mode
shiftDown()   Shift down one gear or gear mode
shiftToGearIndex(index) number Shift to a specific gear or gear mode
cycleGearboxModes()   Cycle between Arcade and Realistic modes
setGearboxMode(behavior) string Set “arcade” or “realistic” mode
setStarter(enabled) bool Actviates or deactivates the engine starter motor
setEngineIgnition(enabled) bool Activates or deactivates the engine ignition
setFreeze(mode) number Activates or deactivates the vehicle freeze mode

Example Usage

Controller setup

"controller": [
"vehicleController": {
  "": 0.25,
  "": 0.05,