VehicleWater
Since 0.7
Water handling: the vehicle floats by the buoyancy component on its body and is pushed and steered through the water by the same throttle, brake (reverse thrust) and steer as on land.
With wheels it is amphibious: as its wheels lose the ground in the water the water handling takes over, and it hands back as they find a shore. Without wheels (a boat, a jet ski) only chassis is needed beside it. Absent: no water handling, and the vehicle behaves exactly as without the feature.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
thrusters | VehicleWaterThruster[] | no | Its propellers or jets. Absent or empty: it floats and steers but pushes nothing. | ||
topSpeed | number | no | 15 | Speed through the water in METRES PER SECOND at which the thrust has faded to nothing, greater than zero. Defaults to 15. | |
reverse | number | no | 0 | Reverse thrust (the brake input) as a fraction of forward, 0..1. Defaults to 0.4. | |
rudder | VehicleWaterRudder | no | A rudder at the stern. Absent: no rudder. | ||
keel | VehicleWaterKeel | no | A keel's lateral resistance (and heave damping). Absent: none. | ||
planing | VehicleWaterPlaning | no | Planing lift on the hull's bottom. Absent: the hull never planes. | ||
righting | number | no | A torque toward upright, as a stiffness in 1/s² (per unit of roll inertia per radian of tilt), 0 or more, applied while the hull is in the water. 0 (the default) is off: a capsized hull stays capsized. | ||
bow | Vec3 | no | The bow, in the body's local space, metres before scale: where ctx.vehicle.water reports spray from. Absent: the middle of the front edge of the chassis collider's bottom face. | ||
slamSpeed | number | no | 2 | Downward speed in METRES PER SECOND at which the hull hitting the water counts as a slam, 0 or more. Defaults to 2. | |
blendTime | number | no | 0 | For a vehicle with wheels: seconds the handover between wheels and water takes as the wheels leave the ground or find it again, 0 or more. Defaults to 0.4. | |
yawDamping | number | no | 0 | The hull's resistance to yawing in the water, 1/s (yaw deceleration per rad/s of yaw rate), 0 or more. Defaults to 0.8. | |
maxYawRate | number | no | 1 | The most yaw rate in RADIANS PER SECOND once the speed through the water reaches yawRateSpeed; below it the limit falls to 35% of this at rest. 0 or more; 0 is no limit. Defaults to 1.4 (about 80 degrees a second). | |
yawRateSpeed | number | no | 6 | Speed through the water in METRES PER SECOND at which maxYawRate is reached, greater than zero. Defaults to 6. | |
lockAtTopSpeed | number | no | 0 | The share of the steering lock (rudder angle, nozzle angle) left at topSpeed, 0..1, falling linearly from full lock at rest. Defaults to 0.6. | |
bank | number | no | The most lean into a turn, RADIANS, 0 or more: the hull leans toward the angle the turn's sideways acceleration asks for, up to this. 0 (the default) is no lean. | ||
bankStiffness | number | no | 40 | How hard the lean is held, 1/s² (per unit of roll inertia per radian), 0 or more. Defaults to 40. | |
trim | number | no | The most bow-up trim, RADIANS, 0 or more, while the hull climbs onto the plane (needs planing): most halfway up the planing ramp, 60% of it once planing, none at rest. 0 (the default) is off. | ||
trimStiffness | number | no | 30 | How hard the trim is held, 1/s², 0 or more. Defaults to 30. |