Log inGet started
World

Joyride Harbor: Drivable Cars, Boats and Aircraft Kit

README.md

build

Turns a preset, look and paint into a vehicle under one root entity. root(e, preset) puts the root's own synced components in place: a dynamic Physics body with the preset's mass and a low centre of mass, the engine's VehicleController (script-driven, gearbox and assists from the catalogue) for car and tank kinds, and a float for boats (the Tidewater water kit's Buoyancy when the world holds it, else the engine's FluidForces, as floater() answers; submersion(e) reads either); call it where this peer may change the root (edit mode, or the owner). root(e, preset, { fresh = true }), for a change of preset, takes the old VehicleController and float off first, so nothing the old preset set is left behind. rig(e, kind, look, paint, opts?) builds everything else as temporary, internal children every peer builds for itself: body and moving-part models (torqueCars bodies, wheels and paint for the car kinds, vehiclesKit.models for the rest), the body collider, WheelColliders with drawn wheels, and a node per seat; opts.display = true builds a showroom model without physics. clear(e) removes what rig built. sea(e, { seaLevel, ground }) lays a sea for a showcase or a test: Tidewater's ocean when the world holds it, else an engine Water box with a flat water surface. Called by the Vehicle component and vehiclesKit.api.display.