Skip to content

eulerjs API / @eulerjs/vehicle

@eulerjs/vehicle ​

Ray-cast vehicles: a body on wheels that are rays, with springs, dampers and tyres that grip up to a limit.

Classes ​

ClassDescription
RaycastVehicleDrives a body on wheels, as games usually do: each wheel is a ray down from where its suspension is mounted, finding the ground (any collider, flat or not, still or moving), and a spring and damper between them. Its tyre pushes along the ground with a force that grows with how much it slips, up to its grip times the load on it; beyond that it slides, which is how a car drifts, skids and spins out. What the wheels push on, they push back on: a car pushes a crate it stands on into the ground, and drags it if it drives off it.
WheelOne wheel of a RaycastVehicle: how it is built, what the driver sets (steering, drive and brake), and what it was doing on the last step.

Interfaces ​

InterfaceDescription
GroundSurfaceWhat the ground under a wheel is like, as RaycastVehicleOptions.surface tells it.
RaycastVehicleOptions-
WheelOptions-

Released under the MIT License.