Table of Contents

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
SyncScript
VehicleScript
Implements
IIdentifiable
ICollectorHolder
Inherited Members

Properties

BrakeTorque

Braking impulse scaling applied when the brake or handbrake is engaged.

public float BrakeTorque { get; set; }

Property Value

float

Definition

Set by VehicleLoader after assembly.

public VehicleDefinition? Definition { get; set; }

Property Value

VehicleDefinition

EngineTorque

Maximum forward drive impulse scaling applied while accelerating.

public float EngineTorque { get; set; }

Property Value

float

MaxSpeedMs

Maximum chassis speed in metres per second at which engine impulse is applied.

public float MaxSpeedMs { get; set; }

Property Value

float

MaxSteerAngle

Maximum steering angle in radians.

public float MaxSteerAngle { get; set; }

Property Value

float

SteerReturnSpeed

Rate at which steering angle returns toward center when input is released.

public float SteerReturnSpeed { get; set; }

Property Value

float

SteerSpeed

Rate at which steering angle increases when steering input is held.

public float SteerSpeed { get; set; }

Property Value

float

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()