five-on-it / packages/sim/src/vehicle / setVehicleClass
Function: setVehicleClass()
setVehicleClass(
sim,eid,cls):void
Defined in: packages/sim/src/vehicle.ts:585
Turns a vehicle into another class in place: the chassis, wheels and trailer are rebuilt where the car stands, raised or lowered along its up axis by the difference in ride height (so a taller class is never built inside the ground and thrown out of it, which would count as a crash), with the current velocity; steering is kept, grip and tyres are reset. Unknown classes and unknown entities are ignored.
Parameters
sim
eid
number
cls
number
Returns
void