feat(animation): two visual player states — normal & attack pose (FLO-474)#119
Closed
Fl0p wants to merge 1 commit into
Closed
feat(animation): two visual player states — normal & attack pose (FLO-474)#119Fl0p wants to merge 1 commit into
Fl0p wants to merge 1 commit into
Conversation
…O-474) The board asked for a player who looks clearly different while attacking (ideally a raised-arms second model). The shipped hero is a single rig-less GLB and no raised-arms variant exists, so a literal two-GLB swap isn't possible today. Instead the attack now reads as a committed full-body chop driven on the visual root via the existing procedural animator: windup winds back and rises, the active frame pitches sharply forward (+0.62 rad, well beyond the <=0.12 rad movement lean) and drops the weight, recovery settles. Result: two unmistakably-distinct silhouettes (normal idle/move <-> attack strike) tied to the melee phase, at zero asset cost — applies to both the forest and human-lands scenes since both feed attackPhase through the controller. A literal raised-arms second model remains a future asset ticket. - proceduralAnimator: attack pitch added to leanX, rise/dip to bobY, by phase - 7 new Vitest cases proving the two distinct states - docs/guide/procedural-animation.md: updated states table + rationale Co-Authored-By: Wayland <wayland@agents.flopbut.local> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by the CTO's Option B decision on FLO-474 — author a dedicated strike-pose GLB ( Closing rather than merging so this doesn't land against that decision. Branch |
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 & why
FLO-468 (board): the player should look clearly different while attacking — ideally a raised-arms second model swapped in on the swing.
Codebase reality (verified, not as remembered): the player is now a single rig-less GLB (
korovany_hero_player-default.glb, FLO-443 —src/scenes/survivorAvatar.ts), animated procedurally on the visual root. There is no raised-arms GLB inpublic/models, so a literal two-GLB swap isn't possible today. The repo's animation philosophy is explicitly transform-based, no rigs (docs/guide/procedural-animation.md).So this delivers the requested two-state read the documented way: a committed full-body attack pose layered on the existing melee phase, giving two unmistakably-distinct silhouettes (normal idle/move ↔ attack strike).
Change
src/game/animation/proceduralAnimator.ts— attack pose by melee phase, driven on the visual root:Pitch is added to the base lean and rise/dip to the bob, so the strike reads even while advancing. Applies to both the forest and human-lands scenes automatically (both feed
attackPhasethroughCharacterController). Zero asset cost.A literal raised-arms second model (pose-baked or rigged GLB) remains a future asset ticket through Iris → Pygmalion — it would drop in behind the same
attackPhasecontract.Verification
npx vitest run proceduralAnimator.test.ts→ 28 passed (7 new cases proving the two distinct states: idle-neutral, windup-back+rise, active-chop, opposite windup/active pitch, recovery-settle, chop-on-the-move, binding drives the node).npm run lint✅ ·npm run build✅docs/guide/procedural-animation.mdupdated (states table + rationale).Notes for reviewers
🤖 Generated with Claude Code