fix(puppet): v0.3.2 — persistent look_at_state across frames

Previously the look-at-rate-limit read p.bone_state[bid].rot as 'current'
and advanced from it. But bone_state.rot is reset-to-rest + keyframe-
sampled at frame start, so 'current' was always near rest (~0) and the
rate-limit only advanced one frame's worth (~7deg) per frame. Visual
result: head/body rotation appeared capped at ~10deg.

Fix: persistent p.look_at_state[bid] table carries angle across frames.
Rate-limit operates on look_at_state.angle (not bone_state.rot). After
rate-limit + clamp, value is written to bone_state.rot.

Init: look_at_state[bid].angle = b.rest.rot on first encounter, so the
first frame advances from rest pose toward target (matches substrate
LookAtState init convention).
This commit is contained in:
Axel Meyer
2026-05-18 20:13:22 +02:00
parent b8b8bf1a76
commit a64055ca2a
2 changed files with 23 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"id": "lib-core.puppet",
"version": "0.3.1",
"version": "0.3.2",
"api_min": "0.1",
"deps": []
}