Body physics Stage 2: physical arm segments (chase-driven upper arm + forearm, hierarchical budgets, layer 5)

- PhysicsArms: per side 2.0 kg upper arm + 1.2 kg forearm RigidBody3D PD-chasing their
  analytic 2-bone IK pose, solved per physics tick from the physical chest shoulders to the
  physical hands; no joints (Box3D has no usable shoulder/wrist joint; AGENTS forbids joints
  between tracked bodies). Budgets from a 60 kg mass stat: hand 90 < forearm 180 < upper
  arm 360 < chest 2400 N. Owns calibration + reach budget (moved from BodyRig); 1 m snap,
  non-finite reset, BodyMath.RotationError servo.
- Layer 5 = player arms (mask 1); props/table/floor masks include it; no self-collision.
- BodyRig: visuals only, arms drawn shoulder -> physical elbow -> wrist.
- ArmSpike: track gap 0, swing lag <= 6 cm, arm pushes prop with hand clear, forearm blocked
  by bar without tunneling and quiet when pinned, teleport snap, NaN reset — PASS x3.
- CollapseSpike now runs the full body (49/49 x3); all six spikes PASS x3.
- HANDOFF/AGENTS: Stage 2 entry (item 10), layers, tuning table, Stage 2b next steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FoxyzandClaude Opus 5.5 committed 2026-10-02 00:04:07 +03:00
1 parent cb518999e5
commit 7589b13aba
11 files changed
+708 -174

No files matched your search

+24 -6
View File
@@ -215,9 +215,10 @@ device only; the editor has an XR simulator for dev. Trackers/action map: see `x
**Grab v5.3.1 VALIDATED in-headset (owner: "it just works") — grab saga closed.**
`PhysicsHands.cs`: physical palm bodies (0.4 kg, 90 N chase, rotation lock, stuck-safety
snap — SUSPENDED for a hand while it grips, HAND ghosts > 10 cm lag). Collision layers:
**1 = world+props, 2 = UI, 3 = player body (PhysicsTorso chest), 4 = player hands** —
chest↔own hands excluded BOTH ways (no self-collision, Nimso/VRChat precedent); props
mask 1|3|4, floor/table mask 1|3|4, hands 4/1|4, chest 3/1|3; panel stays 2/0 (props pass
**1 = world+props, 2 = UI, 3 = player body (PhysicsTorso chest), 4 = player hands,
5 = player arms (PhysicsArms segments)** — no self-collision between own body parts
(Nimso/VRChat precedent); props/floor/table mask 1|3|4|5, hands 4/1|4, chest 3/1|3,
arm segments 5/1; panel stays 2/0 (props pass
through even when shown); layers live on
CollisionObject3D, NOT CollisionShape3D. Panel = prop-UI prototype (ax_button summon,
contact-press knobs, Reset). Laser/distant grab REMOVED (user never knew it existed);
@@ -241,14 +242,16 @@ device only; the editor has an XR simulator for dev. Trackers/action map: see `x
for servo errors — `BodyMath.RotationError` (atan2) is the rule; every driven body runs
`BodyMath.ResetIfNonFinite`.** Regression: `scenes/collapse_spike.tscn` (run headless with
`--fixed-fps 90`) must print "COLLAPSE: overall PASS". `BodyRig.cs` is
VISUALS-only (head cube + 2-bone analytic arms, soft IK, elbow pole,
reach budget feeding `PhysicsTorso.ReachOffset`). Headless regression:
VISUALS-only (head cube + arm boxes drawn through the physical elbow; IK + reach budget
moved to `PhysicsArms`, item 10). Headless regression:
`scenes/body_spike.tscn` must print "BODY: overall PASS" (also proves the Box3D pair
rules: one-way contact, hand-through-chest exclusion, prop contact) — note its repro gap:
no static-table overlap, no welded heavy props. Stage 2 (physical
arm chains + hierarchical per-joint budgets, Nimso/Boneworks tier) — see item 10; design + prior art in `research/vr-body-physics-hugs.md`,
stack facts in `research/vr-body-physics-godot.md`.
9. **Getting a body (rig) — placeholder v1.3 (cube character, agent-built).** `BodyRig.cs`:
9. **Getting a body (rig) — placeholder v1.3 (cube character, agent-built).** (The IK/yaw/reach
math described here now lives in `PhysicsArms.cs` / `PhysicsTorso.cs`; `BodyRig.cs` only
draws.) Original notes:
all-BOX primitives (owner preference) — head 0.15³ behind the eyes, slim torso retracted,
wrist-anchored 2-bone arms. **Soft IK applied**: shoulder→hand distance clamped to
reach×0.98 before the solve (the straight-arm singularity was the overextension shake; if it
@@ -263,3 +266,18 @@ device only; the editor has an XR simulator for dev. Trackers/action map: see `x
the head/neck look override exists. **HANDOFF.md at project root is the takeover document**
(constant table verified against code — code wins on drift); keep it updated when systems
change.
10. **Body physics Stage 2 — PHYSICAL ARMS, implemented 2026-10-02, awaiting owner playtest.**
`PhysicsArms.cs`: per side an upper-arm + forearm RigidBody3D (2.0 / 1.2 kg, layer 5) that
PD-chase their analytic 2-bone IK pose, solved each physics tick from the PHYSICAL chest
shoulders to the PHYSICAL hands. **No joints** — Box3D has no usable 3-DOF shoulder/wrist
joint (PinJoint's hidden identity spring, no Generic6DOF) and this file's architecture
forbids joints between tracked bodies; the research's hinge-motor chain is therefore
deferred, chase segments are the Box3D-honest version. Hierarchical budgets (Nimso muscle
model) from a 60 kg body-mass stat: hand 90 N ≺ forearm 180 N ≺ upper arm 360 N ≺ chest
2400 N. What it gives: arms that push props, rest on / get blocked by geometry (no
tunneling), and draw honestly (BodyRig's elbow = the physical elbow). What it does NOT do
yet (Stage 2b candidates, owner feel decides): a blocked forearm does not hold the HAND
back (hands still chase the controllers independently), and prop/NPC forces on the arm
don't flow into the chest. Regression: `scenes/arm_spike.tscn` "ARM: overall PASS";
the full body also runs inside `scenes/collapse_spike.tscn`. Design + prior art:
`research/vr-body-physics-hugs.md` §5–7, `research/vr-body-physics-godot.md`.