Full avatar skeleton on the rig + body anchoring #10

Closed
muse-lantern wants to merge 2 commits from muse-lantern/engine-legacy:full-skeleton into main
Member

Stacked on PR #9 (which is stacked on #8); the diff to review is the single commit 9ae3df5.

The skeleton (Zach's rig requirement, game-planning #19): the rig now carries the full avatar-contract skeleton at all times, mesh or no mesh, so a conforming player model maps straight onto it later.

  • src/player/avatar_skeleton.gd builds it from a data table in code — the contract as text: diffable, and asserted exactly by tests. 51 bones: the 39 verified arms bones (names read from the shipped GLB) + Hips, Spine, Neck, Head + Upper_Leg/Lower_Leg/Foot/Toe per side (leg chain per Resonite's rig requirements). Rest pose standing, facing −Z.
  • Count note, in the open: our arms README records the full rig as 54; only 51 are derivable from the verified subset + documented remainder. Per Zach's call this builds with the 51 — the unaccounted 3 get added when identified (additions don't break the contract; renames would). The discrepancy is also documented in the file header.
  • Mock collisions for IK: an Area3D on physics layer 10 holding capsule/sphere volumes at the torso, head, arm and leg bone positions — root-level mocks today; bone-posed attachments arrive with the real IK work.

Anchoring (the other half of the 2026-10-21 headset findings): PlayerRig.body_floor_transform() — the player body's ground position, yaw only — now roots both the avatar and ArmsView every frame. Arms and skeleton live in the body root, not the tracking root: shoulders follow the body's physical position instead of hanging at the tracking origin. ArmsView's authored 180° yaw composes on top; its solver already converts controller world transforms through the skeleton's global transform, so the solving path is untouched.

Verified: skeleton_check PASS (34 assertions: exact names, parents, rest positions, sides, mocks, anchoring math) · smoke/arms/addon/save/rig_motion/pause PASS · bridge e2e PASS · real boot clean. CI list gains skeleton_check.

— Lantern

**Stacked on PR #9** (which is stacked on #8); the diff to review is the single commit `9ae3df5`. **The skeleton** (Zach's rig requirement, game-planning #19): the rig now carries the full avatar-contract skeleton at all times, mesh or no mesh, so a conforming player model maps straight onto it later. - `src/player/avatar_skeleton.gd` builds it from a data table in code — the contract as text: diffable, and asserted exactly by tests. 51 bones: the 39 verified arms bones (names read from the shipped GLB) + Hips, Spine, Neck, Head + Upper_Leg/Lower_Leg/Foot/Toe per side (leg chain per Resonite's rig requirements). Rest pose standing, facing −Z. - **Count note, in the open:** our arms README records the full rig as 54; only 51 are derivable from the verified subset + documented remainder. Per Zach's call this builds with the 51 — the unaccounted 3 get *added* when identified (additions don't break the contract; renames would). The discrepancy is also documented in the file header. - **Mock collisions for IK**: an Area3D on physics layer 10 holding capsule/sphere volumes at the torso, head, arm and leg bone positions — root-level mocks today; bone-posed attachments arrive with the real IK work. **Anchoring** (the other half of the 2026-10-21 headset findings): `PlayerRig.body_floor_transform()` — the player body's ground position, yaw only — now roots **both** the avatar and ArmsView every frame. Arms and skeleton live in the body root, not the tracking root: shoulders follow the body's physical position instead of hanging at the tracking origin. ArmsView's authored 180° yaw composes on top; its solver already converts controller world transforms through the skeleton's global transform, so the solving path is untouched. **Verified**: skeleton_check PASS (34 assertions: exact names, parents, rest positions, sides, mocks, anchoring math) · smoke/arms/addon/save/rig_motion/pause PASS · bridge e2e PASS · real boot clean. CI list gains skeleton_check. — Lantern
SaveGame gains the working file boundary the design always
planned: save_state/load_state/has_state — a state Dictionary as
human-readable JSON, backup-first (an overwrite copies the old
file to .bak before writing). The #28 full-snapshot skeleton stays
as the documented refinement of what goes inside the dict.

Game wiring:
- New Game writes the run slot (user://saves/run.json)
- Returning to the menu from a game re-dumps, rig still where the
  player stopped — Continue resumes from exactly there
- Continue reads the slot back: level (re)load if it differs, rig
  transform restored wholesale via PlayerRig.place_at_transform
- Continue button lights up whenever a save exists (boot + every
  return to menu refresh it)
- Sandbox never reads or writes the save (throwaway by design)

tests/save_check.gd: unit round-trip + backup contents, boot
no-op Continue, dump/restore pose round-trip through the real
Game flow, sandbox byte-isolation. SAVE CHECK PASS; smoke, arms,
addon suites and the bridge e2e still PASS.
CI: Forgejo Actions test workflow (push + PR, status only)
Some checks failed
tests / test (pull_request) Failing after 14s
1aa6b8be12
Runs everything automatable on the pinned Godot 4.6.3 standard
build, downloaded per run:
- project import
- the headless suites (smoke_menu, arms_check, addon_check,
  save_check; terrain_check joins automatically once it lands —
  branches without it skip it in the open). The suites exit 0
  either way, so the step greps their PASS/FAIL output
- the debug bridge e2e, under Xvfb, which exits non-zero itself

No artifacts are uploaded, nothing is published, no release job —
the workflow only reports test status.

Verified locally: YAML parses; the suite step's script runs all
four suites green and exits 0; a deliberate FAIL probe makes it
exit 1.
Placement negates velocity; strafe on; harness-proof the suites
Some checks failed
tests / test (pull_request) Failing after 19s
fb3998af7d
Zach's bug (found testing main): walk off the sandbox, fall, return
to the menu, New Game — the body's stored fall velocity punched the
player through the floor. Rule (game-planning #28): placement means
at rest, and velocity is never saved. PlayerRig.place_at and
place_at_transform now zero the body's velocity and ground control
via _reset_motion().

Also: MovementDirect's strafe flag was never set (library default
off = stick X discarded = forward/back only). Strafing is the
decided scheme (game-planning #19); strafe = true in the rig scene.

Test fallout, all harness-only (real boots verified clean): in
--script mode a script keeps its first compile, which runs before
autoload identifiers register — the rig's typed children stay Nil
in any suite loading the game scene, and a mid-body script error
once hung save_check by re-running its body on dirty state.
- save_check: completion latch (abort reports FAIL, never loops);
  strafe read from scene state; velocity assertions moved out
- tests/rig_motion_check.gd (new): clean-process unit check that
  loads rig+body scripts after the broken window and exercises the
  real place_at_transform — velocity and ground control zeroed
- CI suite list gains rig_motion_check

Verified: save_check PASS, rig_motion_check PASS, smoke/arms/addon
PASS, bridge e2e PASS.
muse-lantern force-pushed full-skeleton from fc7133087b
All checks were successful
tests / test (pull_request) Successful in 37s
to 71194b36fe
All checks were successful
tests / test (pull_request) Successful in 43s
2026-10-23 18:57:21 +00:00
Compare
muse-lantern force-pushed full-skeleton from db02f3347a
Some checks failed
tests / test (pull_request) Failing after 44s
to d2c181c21c
Some checks failed
tests / test (pull_request) Failing after 1m24s
2026-10-23 19:25:28 +00:00
Compare
muse-lantern force-pushed full-skeleton from 1dc060dc4c
Some checks failed
tests / test (pull_request) Failing after 52s
to c53df2ae66
All checks were successful
tests / test (pull_request) Successful in 39s
2026-10-23 20:22:11 +00:00
Compare
muse-lantern force-pushed full-skeleton from c53df2ae66
All checks were successful
tests / test (pull_request) Successful in 39s
to e6cf141b6d
All checks were successful
tests / test (pull_request) Successful in 39s
2026-10-23 20:50:01 +00:00
Compare
muse-lantern force-pushed full-skeleton from e6cf141b6d
All checks were successful
tests / test (pull_request) Successful in 39s
to 6b08864dd7
All checks were successful
tests / test (pull_request) Successful in 1m50s
2026-10-23 22:36:00 +00:00
Compare
muse-lantern force-pushed full-skeleton from 6b08864dd7
All checks were successful
tests / test (pull_request) Successful in 1m50s
to 34cbc0928c
Some checks failed
tests / test (pull_request) Failing after 1m1s
2026-10-25 00:45:36 +00:00
Compare
muse-lantern force-pushed full-skeleton from 34cbc0928c
Some checks failed
tests / test (pull_request) Failing after 1m1s
to a583392a83
Some checks failed
tests / test (pull_request) Failing after 58s
2026-10-25 00:52:49 +00:00
Compare
Owner

Remake this PR using the new avatar-humanoid branch for me.

Remake this PR using the new `avatar-humanoid` branch for me.
Author
Member

Superseded by #14 (avatar-humanoid rebuild, per Zach's comment above).

Superseded by #14 (avatar-humanoid rebuild, per Zach's comment above).
muse-lantern closed this pull request 2026-10-25 04:52:39 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dead-air/engine-legacy!10
No description provided.