Class VehicleScript
- Namespace
- LibreRally.Vehicle
- Assembly
- LibreRally.dll
Handles keyboard driving input for a vehicle assembled by VehicleLoader and applies drive and brake impulses to the chassis body, tracks steering input, and performs roll stabilization.
public class VehicleScript : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
SyncScriptVehicleScript
- Implements
-
IIdentifiableICollectorHolder
- Inherited Members
Properties
BrakeTorque
Braking impulse scaling applied when the brake or handbrake is engaged.
public float BrakeTorque { get; set; }
Property Value
Definition
Set by VehicleLoader after assembly.
public VehicleDefinition? Definition { get; set; }
Property Value
EngineTorque
Maximum forward drive impulse scaling applied while accelerating.
public float EngineTorque { get; set; }
Property Value
MaxSpeedMs
Maximum chassis speed in metres per second at which engine impulse is applied.
public float MaxSpeedMs { get; set; }
Property Value
MaxSteerAngle
Maximum steering angle in radians.
public float MaxSteerAngle { get; set; }
Property Value
SteerReturnSpeed
Rate at which steering angle returns toward center when input is released.
public float SteerReturnSpeed { get; set; }
Property Value
SteerSpeed
Rate at which steering angle increases when steering input is held.
public float SteerSpeed { get; set; }
Property Value
Methods
Start()
Caches the assembled chassis and wheel rigid bodies from the spawned vehicle hierarchy.
public override void Start()
Update()
Polls player input and applies the resulting drive, brake, and steering commands.
public override void Update()