Repository navigation
feat(fp): a blow's thump pans toward where it came from (hit_direction) - #121
Merged
Merged
Conversation
Pairing #95's arc with sound: health's _flash_from — the same first-person, flag-gated angle source as the screen-edge arc — emits the new bus signal hero_hit_dir(angle) just before hero_hurt, and the audio feature pans the hurt's existing punch thump a fist's reach (DIR_THUMP_M) toward the blow's source instead of sounding at the chest. No new buses or samples; third person and the flag off stay exactly as before by construction. fp_hitdir_test pins the pan signs (right, left, behind, chest-centred without a marker, and that a marker spent on a thump-less cause never leaks); fp_health pins the signal's angles and its silence in third person. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 10 changed files (gdlint, complexity, TODO policy, dead code). Run |
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.
What
Round-4 impact item 6: the audio half of
hit_direction. In first person, the thump of a blow that lands on the hero pans a fist's reach toward where the blow came from — the same angle that drives #95's screen-edge arc. Third person and flag-off are untouched: health only emits the direction in first person with the flag on, so the thump keeps sounding at the chest there.How
hero_hit_dir(angle), emitted byhealth_feature._flash_from(5b's angle source: 0 ahead, +PI/2 from the right, ±PI behind) just beforehero_hurt.audio_featureremembers the pending angle and, on thehero_hurtthat follows, offsets the existingpunch_hitthump byDIR_THUMP_M(0.9 m) toward the source — the body's right is(cos, -sin)of the yaw and it faces(-sin, -cos), the same convention as the flinch and the arc. A pending angle is consumed by whatever hurt comes next, so one spent on a thump-less cause (fall) never leaks. Cars and bites keep their own placements.Tests
tools/tests/fp_hitdir_test.gd: pans right/left/behind pin the sign and reach against the player's yaw; no marker leaves the thump chest-centred; a marker on a thump-less cause is spent, not saved.fp_health_test._check_hit_directionalso recordshero_hit_dir: both angles reach the bus in first person, and nothing fires in third person. (fp_health_test stays at the 1000-line cap; fp_audio_test was already exactly at it, hence the dedicated file.)Suites: fp_hitdir, fp_health, fp_hud green; run_all + pre-commit green; docs/api regenerated for the touched pages; ARCHITECTURE's health and audio rows carry the clause. Gate covered by CI per the window-freeze terms.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>