Vehicle
Contains functions for controlling the Vehicle Entity.
Properties
maxSpeed
Gets/sets the current maximum normal speed.
maxSpeedBoosting
Gets/sets the current maximum speed during boosting.
reverseSpeed
Gets/sets the current maximum reverse speed.
acceleration
Gets/sets the current acceleration speed.
deceleration
Gets/sets the current deacceleration speed.
maxSteerStrength
Gets/sets the current maximum steer strength. Bigger values will make the vehicle turn sharper.
steerAcceleration
Gets/sets the current maximum steer acceleration. This defines how fast the vehicle can steer.
steerDeceleration
Gets/sets how fast the vehicle can stop steering when user is not pressing any buttons. Can be used to simulate inertia.
speedToDrift
Gets/sets the minimum speed that the vehicle must be going to start drifting.
driftDuration
Gets/sets the maximum duration of a drift (in seconds).
boostDuration
Gets/sets the maximum duration of a drift (in seconds).
boostCooldown
Gets/sets the cooldown time between boosts (in seconds).
Functions
boost(duration)
Applies a boost to the vehicle.
Parameters
- duration — The duration of the boost (in seconds).