five-on-it / packages/sim/src/vehicle
packages/sim/src/vehicle
The vehicle model: a Rapier raycast vehicle per entity (any number of axles), the player's input (engine, brakes, steering, handbrake, boost), the drivetrain and wheelspin model, the drift model, the landing stun, per-wheel tyres that pop on nail strips (each wheel's path since the last tick is swept, so no speed skips a strip), trailers hitched on a ball joint, two-wheelers held upright by a self-righting torque, switching a car's class in place, and the pose accessors the net code uses for snapshots and reconciliation.
Interfaces
Variables
Functions
- bodyOfAnother
- classOf
- crossesNailStrip
- getPlayerInput
- getPose
- getVehicleClass
- getVehicleSteer
- getVehicleTrailer
- getVehicleTyres
- getWheelContact
- isTrailer
- listTrailers
- listVehicles
- nearestPoint
- nearestSpawn
- onNailStrip
- parkVehicle
- popTyre
- removeVehicle
- resetVehicle
- restingPose
- setPlayerInput
- setPose
- setPursuit
- setVehicleClass
- setVehicleDynamics
- setVehicleFuelled
- setVehicleSteer
- spawnVehicle
- syncOne
- vehicleSpotTaken
- vehicleSystem
- wheelAngle