#1514

Improve rumble-strip audio and tyre alignment

DraftProxyFirewall202wants to merge intofrom

Summary

Improves BeamNG.Earth's existing rumble-strip cue with ProxyFirewall202's own recording, continuous playback while tyres remain on a likely strip, fade-in/fade-out, and positional audio at the individual tyre contact points.

Changes

  • Samples the player vehicle's wheel nodes in a small on-demand vehicle extension, estimates each tyre's road contact point, and sends those points to the GE-side rumble handler.
  • Fixes sensor activation and GE callback routing to use the extension globals and module cache used by this mod; the prior routing prevented wheel data from reaching playback.
  • Matches each wheel point against the current navigation graph. Narrows the road-distance gate to avoid matching a nearby eligible road and allows a wider outer-line tolerance because OSM road widths do not describe painted-line placement precisely.
  • Replaces brief center-of-vehicle one-shots with independently positioned looping 3D emitters, with enter/exit hysteresis and short fades.
  • Replaces the generated WAV and prior sample with the recording supplied by ProxyFirewall202. It is converted to mono 44.1 kHz OGG, with a cross-faded loop seam; runtime fade-in/fade-out is retained.
  • Updates the in-game setting description, changelog, credits, and rumble-strip documentation.

Files

  • rumble.lua, rumbleSensor.lua, core.lua, navgraph.lua
  • earthSettingsStore.js
  • rumble_strip.ogg (replaces rumble_strip.wav)
  • CHANGELOG.md, CREDITS.md, docs/RUMBLE_STRIPS.md

Validation

  • Branch is based directly on upstream dev SHA b0be90fd78564444330436ca200a2b7ba534cd29.
  • git diff --check passed for the routing fix. The replacement OGG is mono Vorbis at 44.1 kHz, about 1.78 seconds, with a cross-faded seam.
  • No automated or in-game tests were run. Please validate audio output, per-wheel placement, line alignment across vehicle types, and no lingering audio after changing/respawning the player vehicle. GitHub CI is running on the latest commit.

Limitations

  • Rumble-strip coverage remains a road-class/country heuristic; line markings are not consistently mapped in OSM, so location and offsets need in-game verification.
  • The recording is spatialized at the touching tyre; perceived cabin balance depends on vehicle/audio listener placement.
  • No controller vibration is included: I did not find a supported BeamNG mod Lua API for triggering a rumble-strip-specific controller pulse.

Activity

3

This pull request is a draft

Merging is unavailable until it is marked ready for review.