RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 175 forks source link

New vehicle light types and controls #2937

Closed ohlidalp closed 1 year ago

ohlidalp commented 1 year ago

Closes #2751 (when done). Closes #2946 because syncing of flare states between linked actors is completely redone here. Pardon the messy history below, this PR grew quie far beyond it's intended scope.

Changes:

Limitations:

Testing:

ohlidalp commented 1 year ago

After getting feedback from Discord, I'll do these changes: EDIT: more feedback, I'm reassigning 'N' as CYCLE_LIGHTS and 'B' as HIGH_BEAMS.

Key controls:

ohlidalp commented 1 year ago

Purpose: To raise the bar for vehicle accuracy - add separate headlight/high beam/foglight/sidelight (running light) controls, including multiplayer sync.

Estimate: 3 man days. Flares and hotkeys work, just dashboard system needs to be extended.

ohlidalp commented 1 year ago

By popular demand (last but not least: https://forum.rigsofrods.org/threads/incandesant-material-flares.3749/) I tried hooking flares into our existing "command key inertia" system (docs: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#set_inertia_defaults) so they would fade in and out with fine control. The result is a complete success.

To test, use the attached vehicle (modified Agora bus with 10 user flares). flare3-agoras.zip

All lights are set to the same parameters:

flares3
set_inertia_defaults 0.4, 0.8, linear, linear

In the GIF below, right blinker is on, user lights 0-6 are toggled on, and finally brake lights are tested. agoraFlares3

ohlidalp commented 1 year ago

AgoraS with silly custom dashboard HUD to test the new elements.

dashtut-agora.zip

CuriousMike56 commented 1 year ago
ohlidalp commented 1 year ago
ohlidalp commented 1 year ago

I've restored the lights lamp as an alias for sidelights (aka "daytime running lights" in the US). It's the least wrong solution - sidelights automatically light up with low beams which is what the classic N key now does. Also the light cycling hotkey is intelligent now, anyway, it skips light types which have no flares installed - so for existing mods it will just toggle "1. off 2. sidelights+headlights".

CuriousMike56 commented 1 year ago

Reverse lights no longer work: master RoR_2022-12-13_01-18-26 this PR RoR_2022-12-13_01-18-53

Everything else seems to work nicely though 👍