Log inGet started
World

Joyride Harbor: Drivable Cars, Boats and Aircraft Kit

Merged

Getting out of a vehicle gives the walking controls back

#1
Author
claude-code @ auraAgent
Opened
Nov 15, 2026
From
contrib-vyyv464r
Into
main
Merged
Nov 21, 2026

When a player gets into a vehicle, controls.module remembers the controlsKit scheme to restore on exit. controlsKit's player-1 controller always names a scheme (twinStick by default) even while controlsKit is not running, so getting out handed the player a twin-stick map and the world's own walking controls never came back (seen in the Tidewater showcase: after leaving the rowboat at the dock the avatar could not walk). This change only remembers a scheme as 'previous' when zinput reports a live map of that name held by controlsKit; otherwise previous stays nil and the world's own controls resume. Files: controls.module/init.luau, and package.yaml version 1.0.12.

Source world: 34465908-dbbb-4f09-b22a-ed8306dea455 Contributed paths:

  • vehiclesKit.package/controls.module/init.luau
  • vehiclesKit.package/package.yaml
  • vehiclesKit.package
  • vehiclesKit.package/controls.module
  • vehiclesKit.package/Vehicle.component/init.luau
  • vehiclesKit.package/vehiclesKit.testSuite/init.luau

25 files changed

  • ChangedvehiclesKit.packageFolderBeforeAfter
  • ChangedvehiclesKit.package/README.md29.2 KB → 30.3 KBBeforeAfter
  • ChangedvehiclesKit.package/Vehicle.componentFolderBeforeAfter
  • ChangedvehiclesKit.package/Vehicle.component/README.md4.1 KB → 4.3 KBBeforeAfter
  • ChangedvehiclesKit.package/Vehicle.component/init.luau46.7 KB → 47.5 KBBeforeAfter
  • ChangedvehiclesKit.package/build.moduleFolderBeforeAfter
  • ChangedvehiclesKit.package/build.module/README.md1.1 KB → 1.4 KBBeforeAfter
  • ChangedvehiclesKit.package/build.module/init.luau10.4 KB → 13.9 KBBeforeAfter
  • ChangedvehiclesKit.package/catalog.moduleFolderBeforeAfter
  • ChangedvehiclesKit.package/catalog.module/init.luau20.4 KB → 20.4 KBBeforeAfter
  • ChangedvehiclesKit.package/controls.moduleFolderBeforeAfter
  • ChangedvehiclesKit.package/controls.module/init.luau8.5 KB → 9.2 KBBeforeAfter
  • ChangedvehiclesKit.package/drives.moduleFolderBeforeAfter
  • ChangedvehiclesKit.package/drives.module/init.luau30.0 KB → 29.8 KBBeforeAfter
  • ChangedvehiclesKit.package/example-island-with-a-kart-a-boat-and-a-plane.guideFolderBeforeAfter
  • ChangedvehiclesKit.package/example-island-with-a-kart-a-boat-and-a-plane.guide/guide.md8.3 KB → 8.4 KBBeforeAfter
  • ChangedvehiclesKit.package/how-to-add-a-drivable-car-boat-or-plane-to-my-game.guideFolderBeforeAfter
  • ChangedvehiclesKit.package/how-to-add-a-drivable-car-boat-or-plane-to-my-game.guide/guide.md12.0 KB → 12.1 KBBeforeAfter
  • ChangedvehiclesKit.package/island.sceneFolderBeforeAfter
  • ChangedvehiclesKit.package/island.scene/README.md3.1 KB → 3.2 KBBeforeAfter
  • ChangedvehiclesKit.package/island.scene/build.luau21.2 KB → 21.3 KBBeforeAfter
  • ChangedvehiclesKit.package/island.scene/scene.json410 KB → 411 KBBeforeAfter
  • ChangedvehiclesKit.package/package.yaml3.9 KB → 3.9 KBBeforeAfter
  • ChangedvehiclesKit.package/vehiclesKit.testSuiteFolderBeforeAfter
  • ChangedvehiclesKit.package/vehiclesKit.testSuite/init.luau31.8 KB → 32.9 KBBeforeAfter

Checks

No checks have been posted.

Reviews

No reviews yet.

Conversation

  1. claude-code @ auraAgentNov 21, 2026

    Fixes #12

    The engine no longer ships @builtin::systems.oceans (Ocean, Buoyancy, the ocean module). 1.1.9 added that Buoyancy to every boat, so boats sank, Joyride Island had no sea and the test suite failed (which also blocks a world holding vehiclesKit from updating @builtin).

    What changes (no hard dependency on any water kit):

    • build.module: new floater() picks the Tidewater water kit's Buoyancy when the world holds it, else the engine's own FluidForces on the hull with the same density and hull box (hullSize = the layout hull, waveDamping 0.25, air off). The check asks the entityOps tool whether the component exists, so Tidewater is never pinned as a dependency. root() puts that float on boats and takes either off other kinds and on a fresh preset switch. New submersion(e) reads either (Buoyancy:submersion() or Physics.fluidForces(id).submerged). New sea(e, { seaLevel, ground }) lays Tidewater's ocean (WaterBody kind ocean) when it exists, else an engine Water box with a flat @builtin water material surface.
    • drives.module: boat submersion goes through build.submersion.
    • island.scene: build.luau lays its sea with build.sea. scene.json is rebaked by hand to the no-Tidewater result (a Water box plus a SeaSurface plane), since this world has no Tidewater; rebuilding the scene in a world with Tidewater picks its ocean.
    • Tests: the boat root test checks whichever float applies and that other kinds carry neither; a new test checks the FluidForces fallback fields; the in-play makeup compares the float in use; the boat-on-the-waves test lays its sea with build.sea and checks the boat floats at its waterline.
    • Still carries this PR's two earlier changes: an idle boat or hovercraft stays with its owner instead of being released (an unowned entity is simulated by no peer, so a released boat froze on moving water; the host claims one nobody owns), and getting out gives back the walking control scheme instead of a twin-stick map. The boat test now expects that: parked, still owned, still floating.
    • Docs: README (Changes 1.1.10, known limits, getting out), build and Vehicle READMEs, both guides, catalog blurb. Version 1.1.10, rebased on 1.1.9.

    Verified on the current engine: vehiclesKit suite 37 of 37 passing (with Tidewater installed). In play, a speedboat and a rowboat on a Tidewater lake sit at the surface (y 12.00 on a 12 m lake, submersion 0.50, steady over 5 s); on a Tidewater ocean the speedboat rides the swell (y within about 0.1 m of the surface over 5 s). With FluidForces forced, a speedboat and a rowboat on an ocean bob at their waterline (the same rest heights as with Tidewater's Buoyancy) and submersion reads 0 to 0.67.

Sign in to comment or review.