Fix NPCs walking backwards
Avatars called Godot's look_at(), which points the node's -Z axis at the target, but the rig's face (eyes/brows/mouth/focus disc, and the Blender successor) is on +Z. Every walking NPC therefore faced away from its movement direction. - add the pure yaw_towards(direction) helper (+Z forward) and use it in both movement paths and the reaction face-turn - fix the head-turn offset to the same +Z convention (basis.z) - test +Z/+X/-Z/arbitrary directions; recapture targeting screenshot - TODO bug item moved to DONE, MEMORY records the convention Headless 209/209.
This commit is contained in:
1 parent
a7daae8a14
commit
0eb17e3bb4
6 files changed
+53
-9
No files matched your search
@@ -814,3 +814,19 @@ lookup, constants, gamepad bindings, and settings persistence.
|
||||
deadzone, remap descriptor/apply/labels, and settings persistence for camera and bindings.
|
||||
- [x] Added `smoke_movement.gd` (windowed) and `11-precision-walk.png` with a movement catalogue
|
||||
entry, AI mockup, and compare coverage.
|
||||
|
||||
## NPC Facing During Movement
|
||||
|
||||
Completed 2026-11-01 (post-v0.5.0, pre-v0.6.0). Headless suite **209/209**.
|
||||
|
||||
- [x] Root cause: `NpcAvatar` used Godot's `look_at()`, which aims the node's **-Z** axis at
|
||||
the target, but the procedural rig's face (eyes, brows, mouth, focus disc) and every
|
||||
Blender-authored successor face **+Z**. Every walking NPC therefore showed its face
|
||||
toward the side it was leaving.
|
||||
- [x] Added the pure `NpcAvatar.yaw_towards(direction)` helper (+Z forward, tested at +Z/+X/-Z
|
||||
and an arbitrary direction), and replaced `look_at()` in the navigation and direct-move
|
||||
paths plus the reaction-face turn.
|
||||
- [x] Corrected the head-turn offsets to use the same +Z convention (`basis.z` instead of
|
||||
`-basis.z`), so noticed NPCs still look at the guard with the fixed facing.
|
||||
- [x] Added `test_yaw_faces_the_movement_direction`; recaptured the targeting screenshot to
|
||||
confirm NPCs now show their back only when walking away.
|
||||
Reference in new issue
Block a user