vehiclesKit.testSuite
This package holds more than this page lists. See all of its files in its world.
README.md
vehiclesKit tests
Checks of vehiclesKit. Most run in edit mode with no physics stepping: the catalogue (14 presets, three looks, twelve paints, each preset's class, scheme, boost, drift style and the VehicleController assists that suit it), each preset's description (land, water or air, the domains it travels on, the kinds of game it suits, and filtering the list by domain and game), every preset's layout (driver and passenger seats, bus with 12 or more, wheels on wheeled presets only, body colliders at least 25 cm clear of the ground on wheeled vehicles, seats inside the footprint), the models for the nine presets torqueCars does not draw (all three looks, spinning parts), building every preset in every look as a driven rig and as a showroom model, the root components per class (VehicleController for cars, Buoyancy for boats, swapped with the preset), the three controlsKit schemes, their touch layouts, the floating proportional steering stick and short touch labels, the seated-pose and rotation maths, seat bookkeeping, the registry of live vehicles (finding one by component, entity, id or name, filtering, nearest, entering one taken from the list, no stray fields) and the public API (spawn, live preset swap, display, describe, HUD settings). Three tests then enter play themselves, in the engine's own test scene with a player (the runner closes the world's scenes, and a synced vehicle with no scene has no owner), on a floor and, where there is no sea, an ocean of their own: a parked kart switched to a monster truck ends up with exactly what a brand-new monster truck has (every field of Physics, VehicleController and Buoyancy, every WheelCollider, the seats); a monster truck the player drives is switched kart, monster truck, kart, monster truck while rolling, and after each switch the camera never stands inside the vehicle's body in any frame, the player is still the driver, still sitting in the seat and still this player's vehicle, and once it has stopped the camera frames it exactly as getting into a brand-new vehicle of that preset does (chase distance, height, where it stands, every part looked through); then it pulls away again and matches a brand-new vehicle of that preset, and a speedboat is given up (owned by nobody) after its driver gets out on the waves. They leave play and discard what they changed. Run with tools.use("tests", "run", { suite = "vehiclesKit" }).