Vehicle
Contains functions for controlling the Vehicle Entity.
This module can only be used in Entity scripts.
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 deceleration 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 te boost (in seconds).
boostCooldown
Gets/sets the time it takes to recharge the boost from empty to full (in seconds). Recharge time will be less if user did not use all the boost.
damageRate
Gets/sets the amount of damage the vehicle inflicts when colliding with other objects. Damage is calculated as the relative speed between the vehicle and the other object and multiplied by this value. Default value is 5.
useMouseSteering
Gets/sets if the car is steered by the mouse instead of the keyboard.
cameraRecenterMode
Gets/sets the current camera recenter mode. By default the camera will recenter only for the driver.
Enums
CameraRecenterMode
- None — value = 0
- DriverOnly — value = 1
- Everyone — value = 2