fix(puppet): v0.4.1 — normalize target_local before clamp (south-flick fix)

When body's world.rot crosses ±π (e.g., body facing south), target_local
in the look-at-block could momentarily be ≈±2π. Without normalization,
the snap-branch wrote that raw value to state.angle, then rot_min/rot_max
clamp produced a discontinuous jump (head 'flicked sideways' when body
faced south, per manual interactive test).

Fix: normalize target_local to (-π, π] BEFORE the snap/slerp/rate-limit
branch and BEFORE clamp. Symmetric handling regardless of which smoothing
mode the bone uses.
This commit is contained in:
Axel Meyer
2026-05-18 21:47:34 +02:00
parent cd639668c5
commit fadaf3b8a3
2 changed files with 7 additions and 1 deletions

View File

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