Docs: 07-20 weapon grip anchor session log (gizmo-authored WYSIWYG grip flow)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 22:58:14 -07:00
parent 760c77c083
commit cd634a9df5
@@ -0,0 +1,25 @@
# 2026-07-20 (E) — Weapon grip anchor: gizmo-authored, WYSIWYG
**Operator:** why is the grip code-consts, and can the manipulation show the ACTUAL weapon at true rotation/size?
**Why it was consts:** DOTS + Rukhanka has no runtime bone Transforms — attachments are rigid-skinned SMRs whose
grip is baked INTO the vertex data (the proven suit-kit path), so *something* must feed the bake; consts were the
feel-pass shortcut. The fix is a designer-grade INPUT, not a different runtime model.
**What shipped (PlayerRigTools):**
- **`Player - Create Weapon Grip Anchor (LANTERN)`** — creates `WeaponGripAnchor` under the `Hand_R` bone in
`Player.prefab`, carrying the ACTUAL axe mesh as an edit-time preview (plain `MeshRenderer` + `M_Weapon_Preview`
URP/Lit + the pack atlas — the runtime deformation shader won't render on a static MR). What you grab with
move/rotate/scale gizmos in the prefab stage IS the axe, live, at true size. Seeded from the consts on first
creation only — re-runs never stomp a hand-tuned anchor.
- **`AttachMeleeWeapon` reads the anchor** (localPosition/localRotation/localScale.x) when present; consts are the
fallback/seed. Non-uniform scale warns and takes X.
- **Runtime safety:** the anchor is tagged **`EditorOnly`** — the Entities baker skips it, so the preview can never
leak an un-animated duplicate. Play-verified: exactly one axe on the rig. Until rebake you see BOTH the preview
(new grip) and the baked axe (old grip) in the prefab stage — a free before/after ghost; coincident = in sync.
**The designer loop:** open `Player.prefab` → search `WeaponGripAnchor` → move/rotate/scale with normal gizmos →
`ProjectM/Animation/Player - Attach Melee Weapon` → the baked axe snaps to the preview, visible immediately in the
prefab stage (no Play mode, no recompile). This is the in-Unity twin of the Blender nudge-and-bake workflow, and
the pattern for future rigid attachments (weapon variants, kit pieces): gizmo anchors for spatial authoring,
profiles for numbers, tools as the bake button.