Repository navigation
feat: add Natural Head Movement effect - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Natural Head Movement, a new Cabin effect that gives the head a TrackIR-like movement without a tracker: the head never holds perfectly still, mimicking the subtle movements of a player wearing a head tracker. Off by default.
All layers are summed:
math::SmootherStep): it starts gently, stops gently, and has no tail. The farther it moves, the longer it takes.Settings are available under Quick Settings > Cabin. Everything else is a constant tuned in-game.
tremor_intensitymicro_intensityposture_intensityposture_intervalsteering_tiltEffects Pausing Other Effects
Natural Head Movement moves the head on its own, so the background motion of a still head would otherwise be layered on top of it. While it plays, it pauses Idle Breathing and Speed Shake; their settings remain untouched.
conflicts::kPausestable (src/core/Conflicts.hpp) that declares which effect pauses which. Effects are declared once by settings prefix and checked at compile time againstsettings::kAll.EffectManagerfades a paused effect out over 0.5 s, with a separate fade per effect, and callsReset()once it has faded out.kPauses.Other Commits
build: disable C++ module scanningWith Ninja and C++23, CMake added GCC's
-fmodules-ts/-fdeps-formatflags tocompile_commands.json, which clangd rejects. The project does not use C++20 modules.refactor: share SmootherStep, Lerp and IsRightHandDriveMoved these helpers from Cabin Walk to
src/math/Units.hppandsrc/effects/Telemetry.hppso both effects can use them. No behavior change.Related Issue
N/A
Type of Change
Affected Effects
EffectManagertoggle fade fix)Checklist
enabledsetting.conflicts::kPauses).NeedsDriverSeat(), if it only makes sense in the driver's seat.settings::kAll(src/core/Settings.hpp).kEffects(src/ui/EffectTabs.cpp).src/core/Keybinds.hpp(kAllActions), if any: no keybind.conflicts::kPauses(src/core/Conflicts.hpp), if any.localization/*.jsonfile.README.md's settings table updated, if a setting changed../SPF_APIdocs before implementing or modifying an SDK interaction.Test Plan
cmake --workflow --preset user-mingw-release.python3 .github/scripts/check-localization.pypasses, if alocalization/*.jsonfile changed.Commit Style
Markdown
.markdownlint-cli2.jsonc.