Skip to content

Cab wheel rotation: the steering wheel in the cab turns as far as the player's own - #3327

Merged
turbo-devv merged 2 commits into
openOMSI-org:mainfrom
filiphajduch420:feature/cab-wheel-rotation
Oct 26, 2026
Merged

turbo-devv merged 2 commits into
openOMSI-org:mainfrom
filiphajduch420:feature/cab-wheel-rotation

Conversation

@filiphajduch420

@filiphajduch420 filiphajduch420 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What changes for the player?

The steering wheel in the cab can now turn as far as your own wheel: set Cab wheel rotation (launcher: Settings › Driving › Game controllers, also under Controls › Game controllers › For every wheel; in the game: Options › Controls) to your wheel's rotation, e.g. 900° or 1080°, and the wheel on screen follows your hands turn for turn. The default, Automatic, keeps every bus exactly as it was.

How to test

  1. Plug in a wheel set to 900° (or 1080°) in its driver, and set Wheel rotation to the same value in the launcher (Settings › Driving › Game controllers).
  2. Start a stock bus (e.g. MAN SD202 or MB O305 on Grundorf) with Cab wheel rotation on Automatic: the cab's wheel turns as before (the bus's own animation; a stock SD202 turns 2171° lock to lock, its model's factor of 1680 over a 37° steering lock).
  3. Set Cab wheel rotation to 900° (or 1080°), in the launcher or in the game's Options, and load the bus again: turn your wheel slowly from lock to lock - the cab's wheel turns the same angle as yours at every point (a quarter turn of yours is a quarter turn in the cab; two and a half turns lock to lock at 900°). The driver's hands stay on the rim.
  4. Set it to 180° and to 1800° to see both ends; set it back to Automatic and the bus's own animation is back.
  5. ~/.openomsi/settings.cfg holds cab_wheel_rotation=900 (or the value set), 0 for Automatic; Reset wheel settings puts it back to Automatic. The log says which animation was scaled: cab wheel rotation: mesh 74 D92\D92_lenkrad_hupe.o3d anim 0 (Axle_Steering_0_L x 1680), axle lock 37.0°: 2171° lock to lock in the model, 1080° now (2 animation(s) scaled x0.498).

Screenshots

Automatic (the bus's own animation) against 1080°, stock MAN SD202 standing on Grundorf, the steering taken centre → full left → full right → centre in 12 s (an offscreen run with a scripted steering profile, the same frames on both sides):

Cab wheel: Automatic vs 1080 degrees

The setting in the launcher (Settings › Driving › Game controllers) and in the game's Options › Controls:

Launcher: Settings, Driving, Game controllers with Cab wheel rotation

Game: Options, Controls tab with Cab wheel rotation

What does this change, and why?

OMSI buses animate the cab's steering wheel with anim_rot on Axle_Steering_* using a factor of their own (1450 on the SD200 family, 1680 on the SD202/Agora/Urbino families, 972-1575 on others), which over the bus's steering lock comes to several turns, far more than a real wheel's 900-1080°, so a player with a wheel sees the wheel in the cab turn differently from the one in their hands (and the driver's hands with it). The new setting cab_wheel_rotation (degrees lock to lock; 0 = the bus's own animation, the default; otherwise 180-1800 in steps of 30) makes the cab's wheel model turn that many degrees over the bus's full steering range.

  • Game side (crates/omsi-sim/src/vehicle/cab_wheel.rs): when the player's bus is set up, its anim_rot animations on Axle_Steering_* with |factor| ≥ 300 are taken as the steering wheel (the hub's buttons share the factor; road wheels use 57.3 and are left alone); their lock-to-lock rotation is factor × 2 × the bus's full steering lock (physics.max_steer_deg), and the factors are scaled once so that it equals the setting. The model's own factors are always the starting point, so repeated calls never compound and 0 restores them. The driver's hands (omsi-scene driver rig) read the live factor, so they stay on the rim. AI and other players' buses are not touched. The log says what was scaled, or that no wheel animation was found.
  • Launcher: the slider in the settings schema (and in the Controllers page's "For every wheel"), the Apple app's settings page, and the key in omsi-launcher-core (default 0; read as 0 for anything under 90, 180 for 90-180, else rounded and capped at 1800; written to settings.cfg, with a round-trip test). Reset wheel settings resets it as well.
  • Game settings and Options: cab_wheel_rotation in settings.rs with the same clamp rule, the Options row next to Wheel rotation / Full lock at, applied to the player's bus at once.
  • Texts: the label and the launcher's and the game's help, in every language of app.yml.
  • CHANGELOG.md and docs/USER_GUIDE.md describe the setting.

What could break?

  • Mod buses that turn their wheel from a script variable of their own (e.g. MAN NewLionsCity's Lenkwinkel from a lookup curve) keep their own rotation: the setting cannot reach them, and the log says no wheel animation was found. Reports of a bus whose wheel looks wrong with the setting on are welcome.
  • A bus that uses several different large factors on its steering meshes (Valiant 1362/1413/1575) is scaled from the largest, so the others come out a little short of the setting.
  • The lock-to-lock comes from physics.max_steer_deg (clamped 10-60°); a bus whose real lock falls outside that is slightly off.
  • VR: not tested; the cab's wheel model is the same one, so it should follow the setting as on a screen.
  • Touch steering on phones and tablets is unaffected: the setting only changes how far the cab's wheel model turns, not the steering; Automatic is the default, and the Apple app shows it only where a wheel can be set up.
  • Settings files of the previous release read as before; a file without the key is Automatic.

Performance

No per-frame cost: the animation factors are computed once at vehicle load (and on a devtools model reload). Measured with OMSI_PROFILE=1 OMSI_PROFILE_JSON=<file> --exit-after 120 on the same duty (Saint-Servan, Agora AL4 I line 21, the bus in service from the start), the branch built on the release's own commit (c7b54b9), two pairs of runs; the table is the second pair, the first pair gave 97.6 / 104.5 fps and p99 15.8 / 14.1 ms the other way round, so the differences are run-to-run noise. scripts/compare-performance.py: p50 9.9 → 9.9 ms, p95 13.2 → 13.4 ms, no stage of the frame changed beyond noise.

This branch (0.3.43 + this change) Current release (0.3.43) 0.2.30
Average FPS 99.5 99.6 not measured (no 0.2.30 build at hand)
Slowest 1 % of frames (p99, ms) 15.3 15.2 –
Memory after 2 min (MB) 3622 working set (8767 private) 3226 working set (8594 private) –

Machine, map and settings: RTX 5070 12 GB, Windows 11 (NVIDIA 32.0.16.2101), Saint-Servan, Agora AL4 I line 21, Enhanced+, 4x MSAA, 1920x1080, the player's own settings (vsync on, max fps 144). The memory is the process's working set / private bytes at the end of the 120 s; the second run had driven further (8106 vs 7287 measured frames), which is where the 400 MB difference comes from.

Checklist

  • cargo test --workspace and cargo build --release pass (omsi-sim 845, omsi-scene 206, omsi-launcher-core 107 and omsi-app settings 63 tests, plus the release build, on Windows; scripts/size-budget.sh and scripts/arch-guard.sh pass)
  • The pull request contains a single change
  • Before/after screenshots are in the description if anything changes on screen
  • A new feature has its performance table filled in (this branch, the current release; no 0.2.30 build to measure)
  • New or changed interface texts are in crates/omsi-app/locales/app.yml, in every language I can
  • Online play, saves, settings and mods made for the previous release still work, or the description says what changes
  • No original OMSI 2 content and no file of a megabyte or more in the commits

… player's own

A new setting, "Cab wheel rotation" (settings.cfg `cab_wheel_rotation`, degrees lock
to lock, 180-1800 in steps of 30; 0 = the bus's own animation, the default), in the
launcher's Settings > Driving > Game controllers, on the Controllers page and in the
game's Options. A 900 or 1080 degree wheel on the desk and the one in the cab then
reach their locks together, where the cab's wheel turned several times over (a stock
SD202's 2171 degrees lock to lock: its model's factor of 1680 over a 37 degree lock).

The player's bus's steering-wheel animations (`anim_rot` on `Axle_Steering_*` with
a factor of 300 or more: the stock SD200's 1450, the SD202's 1680) are scaled once
at vehicle load so that their lock-to-lock rotation, taken from the bus's full
steering lock, equals the setting; the hub's buttons scale with the rim, the road
wheels are left alone, and the driver's hands follow the scaled factor. A bus that
turns its wheel from a script variable of its own keeps its own rotation, which the
log says. AI and other players' buses are not touched.

Tests: the scale, the animation detection, a synthetic bus (rim and button scale,
road wheel stays, repeated calls do not compound, 0 restores), model reload keeps
the setting, the settings default and clamp table, and the launcher round-trip.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Test builds for 94d9832

Platform Download
Android (arm64) android.zip
Linux x64 (game and dedicated server) linux-x64.zip
macOS (Apple silicon) macos-arm64.zip
Windows x64 (game and dedicated server) windows-x64.zip
  • Unpack the download into a new folder, not over your openOMSI. The launcher shows the version as ...-pr3327, and a test build is never updated. It shares your settings and OMSI 2 folder; mods you installed into your openOMSI folder are only seen when you unpack it into a copy of that folder.
  • Android: the download holds an APK that installs as a separate app, openOMSI PR Cab wheel rotation: the steering wheel in the cab turns as far as the player's own #3327, beside the release, and shares its openOMSI folder.
  • What to try is under How to test in the description. Please comment with what you found and the version the launcher shows.
  • The links work for 14 days after the build.

@turbo-devv

Copy link
Copy Markdown
Collaborator

Thanks! #3329 just landed and touches the same files (CHANGELOG.md, locales/app.yml, USER_GUIDE.md, the launcher's controllers.js and settings-schema.js), so this one now conflicts with main. Could you merge main into the branch and resolve it? CI was green before, so it can go in right after.

@isaacsa2 isaacsa2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 94d9832. Automatic (cab_wheel_rotation=0) is the default and restores the model's original factors; choosing a degree value enables the override. The tests cover restoring zero, repeated changes without compounding, road wheels staying untouched and model reload. The opt-out requirement is met. Apple / build is still running, so approval remains pending until that check completes. I reviewed the code and supplied evidence; I have not tested a physical wheel or VR locally.

@turbo-devv turbo-devv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts with main resolved (controllers.js: kept the FeedbackCard layout, added the cab_wheel_rotation row); CI green.

@turbo-devv
turbo-devv merged commit 35470a0 into openOMSI-org:main Oct 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants