FFullBodyIK
UE's Full Body IK, as a multi-effector FABRIK over the skeleton TREE rather than over one chain.
- Module
- Animation
- Header
#include "Animation/IK/FullBodyIK.h"- Namespace
Mowo
The chain solver already here cannot express this: run it twice for two arms and the second solve overwrites the spine the first one bent, so the body snaps between the two targets frame to frame depending on the order. The tree form fixes that by making a shared joint the weighted average of what each effector's backward pass wants from it — the classic multi-effector FABRIK sub-base rule — and only then running one forward pass outward from the root.
Positions-only, like FABRIK: rotations are reconstructed at the end from the direction each bone's children moved. Because every segment length is preserved through the solve, writing rotations alone reproduces the solved positions exactly, and the root's translation is the single exception (it only moves when the root is unpinned).
The one place that reconstruction is approximate is a BRANCHING joint: a chest pulled two ways has one rotation and two children asking for different ones, so it gets the weighted average and the effectors below it would land near their targets rather than on them. refineBranches closes that gap by re-solving each effector's limb below its branching joint with the chain solver, which is what PBIK's per-bone rotation offsets buy UE. Joint limits (FFullBodyIKBoneSetting::limit) are enforced in the forward pass, the one that owns the final positions; a limited limb is not refined.
Public functions
| Returns | Name | Description |
|---|---|---|
void | Solve |
Function details
Solve
static void Solve(const Skeleton& skeleton, const FFullBodyIKSetup& setup, std::vector<Mat4>& localTransforms)