A post-process Control Rig that turns and leans an armored character and tucks their arms away from whatever is closest. It runs off the incoming pose and a physics probe, with no gameplay code or per-obstacle animation.
A post-process Anim Blueprint layers a hand-authored sword-on-shoulder pose onto the right-clavicle branch only (the rest of the body passes through motion matching untouched), then runs the avoidance rig on top.
The first build fired six radial probes around the torso and failed in a crowd. The per-side probe results were summed, so two distant NPCs on one side produced a larger reaction than one NPC touching the character. The rig was measuring obstacle count instead of proximity. An obstacle on each side cancelled to zero and the character walked straight between them.
Replacing those sums with a max made each side report its single deepest penetration, which is what "how close is the nearest thing" means. The probe was then rebuilt as one sphere of radius 85 encapsulating the upper body. It takes two traces, because the sphere gives direction (the push-out normal from an overlapping sweep) but exposes no penetration depth. A second thin trace fired back along that normal measures the real distance and keeps the reaction graded instead of binary.
I seamed the rebuild at the two 0-1 side fractions and left everything downstream (yaw, lean, arm tuck and four independent smoothing chains) untouched, so a detection change could not silently alter the feel of the response.
Both arms tuck by composing a rotation onto the incoming bone transform rather than replacing it, so the layered sword pose survives. The left mirrors the right by omitting a sign negation, and releases through a peak-hold decay so the arm eases back instead of snapping when an obstacle leaves the bubble.
Python remote execution into the running editor's interpreter is the only path that reaches real BlueprintCallable functions rather than poking raw properties, which matters for anything with side effects. Control Rig and Anim Blueprint graphs are authored by script with a layout-and-comment pass, so generated graphs stay readable rather than stacking nodes on one another.
Before deleting anything I ran a reachability proof: compute the exec-reachable set plus its transitive data ancestors, then assert nothing outside it feeds in. That removed 62 dead nodes from the avoidance rig without touching a live wire. A visual QA loop captures the viewport with camera pose and labeled actors decoded alongside the image and diffs against a reference, and Perforce work is kept in scoped changelists, because a bare submit on binary .uasset work sweeps in everything opened.