Class RallyCarComponent
- Namespace
- LibreRally.Vehicle
- Assembly
- LibreRally.dll
Core component for rally vehicle simulation, handling engine, transmission, steering, and tyre dynamics.
[ComponentCategory("LibreRally")]
public sealed class RallyCarComponent : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
SyncScriptRallyCarComponent
- Implements
-
IIdentifiableICollectorHolder
- Inherited Members
Fields
PsiToBar
PSI to bar conversion factor.
public const float PsiToBar = 0.0689476
Field Value
Properties
AbsActive
Whether ABS is actively reducing brake pressure.
public bool AbsActive { get; }
Property Value
AbsApplyRate
How quickly ABS removes brake torque once lock-up is detected (1/s).
public float AbsApplyRate { get; set; }
Property Value
AbsEnabled
Whether the active vehicle definition equips ABS.
public bool AbsEnabled { get; set; }
Property Value
AbsMinBrakeTorqueScale
Minimum fraction of service-brake torque ABS still allows when a wheel is close to locking.
public float AbsMinBrakeTorqueScale { get; set; }
Property Value
AbsMinimumSpeedKmh
ABS stays inactive at parking speeds to avoid chatter right at a stop.
public float AbsMinimumSpeedKmh { get; set; }
Property Value
AbsReleaseRate
How quickly ABS restores brake torque after wheel speed recovers (1/s).
public float AbsReleaseRate { get; set; }
Property Value
AbsSlipRatioTarget
Target braking slip-ratio magnitude taken from the active JBeam brake definition.
public float AbsSlipRatioTarget { get; set; }
Property Value
AbsSlipRatioWindow
Slip-ratio window above the ABS target over which brake torque ramps down to the minimum scale.
public float AbsSlipRatioWindow { get; set; }
Property Value
AirRegulatorTemperature
Thermostat target temperature (°C) — the engine's normal operating temperature.
public float AirRegulatorTemperature { get; set; }
Property Value
AutoClutchLaunchRpm
Auto-clutch launch hold RPM used to let the engine build torque from a stop.
public float AutoClutchLaunchRpm { get; set; }
Property Value
AutoClutchMinTorqueScale
Minimum fraction of engine torque the automatic clutch still transmits while limiting excessive grounded wheelspin.
public float AutoClutchMinTorqueScale { get; set; }
Property Value
AutoClutchWheelspinWindowRpm
Equivalent engine-RPM window of excess driven-wheel spin over which the automatic clutch reduces transmitted torque to stop a full-throttle launch becoming a sustained burnout.
public float AutoClutchWheelspinWindowRpm { get; set; }
Property Value
BrakeInput
Filtered combined brake input (0–1).
public float BrakeInput { get; }
Property Value
BrakeMotorForce
Brake motor force — how hard wheels resist rotation when braking.
public float BrakeMotorForce { get; set; }
Property Value
BreakWheels
Gets or sets the list of entities representing wheels that have brakes applied.
public List<Entity> BreakWheels { get; set; }
Property Value
BurnEfficiencyThrottle
Burn efficiency throttle axis (0–1). Pair with BurnEfficiencyValues.
public float[] BurnEfficiencyThrottle { get; set; }
Property Value
- float[]
BurnEfficiencyValues
Burn efficiency values (0–1) corresponding to each throttle point.
public float[] BurnEfficiencyValues { get; set; }
Property Value
- float[]
CarBody
Gets or sets the entity representing the car's main chassis body.
public Entity CarBody { get; set; }
Property Value
ChassisYawAssist
Minimal parking-speed yaw helper. It only tops up initial rotation until tyre forces and suspension load transfer take over.
public float ChassisYawAssist { get; set; }
Property Value
CurrentGear
Currently selected gear (0 = reverse, 1 = first, etc.).
public int CurrentGear { get; }
Property Value
DriveInput
Combined drive demand (throttle - brake).
public float DriveInput { get; }
Property Value
DriveRatio
Total drive ratio from engine to wheel (including gear and final drive).
public float DriveRatio { get; }
Property Value
DriveWheels
Gets or sets the list of entities representing wheels that are driven by the engine.
public List<Entity> DriveWheels { get; set; }
Property Value
DrivelineRpm
Effective driveline RPM before final drive.
public float DrivelineRpm { get; }
Property Value
DrivenWheelSlipRatio
Current maximum slip ratio across all driven wheels.
public float DrivenWheelSlipRatio { get; }
Property Value
Dynamics
Vehicle dynamics system computing tyre forces, load transfer, differentials, and anti-roll bar effects. Created during Start() and updated each frame.
public VehicleDynamicsSystem? Dynamics { get; set; }
Property Value
EngineBlockAirCoolingEfficiency
Air cooling efficiency coefficient from JBeam.
public float EngineBlockAirCoolingEfficiency { get; set; }
Property Value
EngineBlockTempDamageThreshold
Engine block temperature at which damage begins (°C).
public float EngineBlockTempDamageThreshold { get; set; }
Property Value
EngineBrakeTorque
Engine braking torque applied when throttle is lifted (N·m).
public float EngineBrakeTorque { get; set; }
Property Value
EngineDynamicFriction
Friction term proportional to engine angular velocity (N·m per rad/s).
public float EngineDynamicFriction { get; set; }
Property Value
EngineFriction
Constant engine friction torque (N·m).
public float EngineFriction { get; set; }
Property Value
EngineInertia
Engine + flywheel rotational inertia (kg·m²). Governs rev-response speed.
public float EngineInertia { get; set; }
Property Value
EngineRpm
Current engine RPM.
public float EngineRpm { get; }
Property Value
EngineTemp
Current engine block temperature (°C). Settles at the air-regulator setpoint.
public float EngineTemp { get; }
Property Value
FinalDrive
Final drive (differential) ratio.
public float FinalDrive { get; set; }
Property Value
ForwardSpeedMs
Forward velocity in m/s.
public float ForwardSpeedMs { get; }
Property Value
FrontCamberGainPerMeter
Front camber gain in bump/rebound (rad/m). Negative values add negative camber in bump.
public float FrontCamberGainPerMeter { get; set; }
Property Value
FrontStaticCamberRadians
Static front-axle camber angle (rad), sourced from JBeam alignment settings.
public float FrontStaticCamberRadians { get; set; }
Property Value
FuelCapacityLiters
Fuel tank capacity (litres). Zero when no tank is defined.
public float FuelCapacityLiters { get; set; }
Property Value
FuelLiters
Remaining fuel (litres).
public float FuelLiters { get; }
Property Value
GearRatios
Forward gear ratios indexed 1–N (index 0 = reverse).
public float[] GearRatios { get; set; }
Property Value
- float[]
HandbrakeEngaged
Whether the handbrake is currently engaged.
public bool HandbrakeEngaged { get; }
Property Value
HandbrakeForceMultiplier
Extra rear brake force multiplier for the handbrake so it can lock the rear axle.
public float HandbrakeForceMultiplier { get; set; }
Property Value
HasTurbo
Whether this engine has a turbocharger.
public bool HasTurbo { get; set; }
Property Value
IdleRpm
Idle RPM (minimum engine speed).
public float IdleRpm { get; set; }
Property Value
LateralGrip
Legacy grip tuning value, now used as the soft-body tyre model's low-speed damping gain.
public float LateralGrip { get; set; }
Property Value
LateralSpeedMs
Lateral velocity in m/s (slip speed).
public float LateralSpeedMs { get; }
Property Value
MaxRpm
Max engine RPM (redline).
public float MaxRpm { get; set; }
Property Value
MaxSteerAngle
Maximum steering wheel lock angle (radians). ~0.52 rad ≈ 30°.
public float MaxSteerAngle { get; set; }
Property Value
OilPressure
Current oil pressure (bar). Correlates with RPM and oil volume.
public float OilPressure { get; }
Property Value
OilTemp
Current oil temperature (°C). Lags slightly behind engine block temp.
public float OilTemp { get; }
Property Value
OilVolumeLiters
Engine oil volume (litres) from JBeam. Used for thermal mass calculation.
public float OilVolumeLiters { get; set; }
Property Value
PlayerInputEnabled
Allows UI systems to temporarily block player input without pausing physics.
public bool PlayerInputEnabled { get; set; }
Property Value
RearCamberGainPerMeter
Rear camber gain in bump/rebound (rad/m). Negative values add negative camber in bump.
public float RearCamberGainPerMeter { get; set; }
Property Value
RearStaticCamberRadians
Static rear-axle camber angle (rad), sourced from JBeam alignment settings.
public float RearStaticCamberRadians { get; set; }
Property Value
ReverseEngageSpeedKmh
Vehicle speed below which holding brake can select reverse gear.
public float ReverseEngageSpeedKmh { get; set; }
Property Value
ServiceBrakeInput
Filtered service brake input (0–1).
public float ServiceBrakeInput { get; }
Property Value
ShiftDownRpm
RPM to downshift at (auto-transmission).
public float ShiftDownRpm { get; set; }
Property Value
ShiftSlipAllowanceRpm
Maximum extra RPM that driven-wheel slip may contribute above road-speed RPM for shifting and torque coupling.
public float ShiftSlipAllowanceRpm { get; set; }
Property Value
ShiftUpRpm
RPM to upshift at (auto-transmission).
public float ShiftUpRpm { get; set; }
Property Value
SpeedKmh
Current vehicle speed in km/h.
public float SpeedKmh { get; }
Property Value
StartingFuelLiters
Initial fuel load (litres), resolved from JBeam startingFuelCapacity.
public float StartingFuelLiters { get; set; }
Property Value
SteerRate
Angular rate at which front wheels steer (rad/s).
public float SteerRate { get; set; }
Property Value
SteerWheels
Gets or sets the list of entities representing wheels that can be steered.
public List<Entity> SteerWheels { get; set; }
Property Value
SteeringInput
Filtered steering input (-1 to 1).
public float SteeringInput { get; }
Property Value
SteeringRack
Current steering rack position (radians).
public float SteeringRack { get; }
Property Value
ThrottleInput
Filtered throttle input (0–1).
public float ThrottleInput { get; }
Property Value
TorqueCurveNm
Torque (N·m at crank) corresponding to each RPM in TorqueCurveRpm.
public float[] TorqueCurveNm { get; set; }
Property Value
- float[]
TorqueCurveRpm
RPM axis of the engine torque curve.
public float[] TorqueCurveRpm { get; set; }
Property Value
- float[]
TractionControlActive
Whether traction control is actively reducing torque.
public bool TractionControlActive { get; }
Property Value
TractionControlApplyRate
How quickly TCS removes torque once excess driven-wheel slip is detected (1/s).
public float TractionControlApplyRate { get; set; }
Property Value
TractionControlEnabled
Enables engine-side traction control based on driven-wheel wheelspin.
public bool TractionControlEnabled { get; set; }
Property Value
TractionControlMinTorqueScale
Minimum fraction of engine torque that TCS still allows through when fully active.
public float TractionControlMinTorqueScale { get; set; }
Property Value
TractionControlMinimumSpeedKmh
TCS stays inactive right at crawl speed where slip-ratio estimates are numerically noisy.
public float TractionControlMinimumSpeedKmh { get; set; }
Property Value
TractionControlReleaseRate
How quickly TCS restores torque after wheel slip recovers (1/s).
public float TractionControlReleaseRate { get; set; }
Property Value
TractionControlSlipRatioTarget
Driven-wheel slip ratio target sourced from the active BeamNG traction-control definition.
public float TractionControlSlipRatioTarget { get; set; }
Property Value
TractionControlSlipRatioWindow
Slip-ratio window above the TCS target over which torque reduction reaches the minimum scale.
public float TractionControlSlipRatioWindow { get; set; }
Property Value
TractionControlTorqueScale
Current torque scale factor applied by traction control (0–1).
public float TractionControlTorqueScale { get; }
Property Value
TractionLossDetected
Whether significant wheel slip is detected on any wheel.
public bool TractionLossDetected { get; }
Property Value
TractionLossSlipThreshold
Driven-wheel slip ratio above which the HUD traction warning lamp turns on.
public float TractionLossSlipThreshold { get; set; }
Property Value
TurboBoostBar
Current turbo boost pressure (bar). Zero when no turbo is present.
public float TurboBoostBar { get; }
Property Value
TurboMaxBoostPsi
Maximum turbo boost pressure in PSI (from wastegate setting).
public float TurboMaxBoostPsi { get; set; }
Property Value
WheelRadius
Wheel radius used to convert speed to spin rate (m).
public float WheelRadius { get; set; }
Property Value
Wheels
Gets or sets the list of entities representing all wheels on the vehicle.
public List<Entity> Wheels { get; set; }
Property Value
YawRateRad
Yaw rate in radians per second.
public float YawRateRad { get; }
Property Value
Methods
Start()
Initializes runtime drivetrain, thermal, and wheel-surface state for the loaded rally car.
public override void Start()
Update()
Advances the rally car simulation, input handling, and telemetry for the current frame.
public override void Update()