struct

IKGoal

A single IK constraint on a three-bone chain.

Module
Game
Header
#include "Game/Components/IKComponent.h"
Namespace
Mowo

Lifetime model: - Author at edit time: chain bone indices + pole hint. These typically point at a character's left arm, right arm, left leg, right leg. - Drive at runtime: targetPosition (and optionally targetRotation) is pushed each frame by gameplay code or the foot-IK pass — the AnimationSystem applies the solve before computing global transforms.

One IKComponent owns N goals; the typical biped uses 2-4 (hands + feet).

Properties

TypeNameDescription
std::stringnameeditor label, e.g. "LeftFoot"
TwoBoneIKChainchainroot/mid/end + pole + weight
Vec3targetPositionDefault Vec3(0.0f, 0.0f, 0.0f).
QuattargetRotationDefault Quat::Identity().
boolhasTargetRotationfalse => end bone follows chain freely Default false.
boolenabledDefault true.
boolautoFootRaycastAuto foot-IK (system-driven by raycast each frame) When autoFootRaycast is true the AnimationSystem performs a downward raycast from the end bone's current world position before running the solver. On hit: targetPosition is updated to hit.point + hit.normal * groundOffset, and (if alignToNormal) targetRotation is rebuilt to align the foot's up-axis to the surface normal. On miss: the goal weight is zeroed for this frame so the limb falls back to the animated pose smoothly. Targets remain in *world space* for these goals; the IK pass converts to skeleton-local before solving. Default false.
floatraycastUpray start: bone world pos + up*raycastUp Default 0.3f.
floatraycastDistancemax ray length from start downward Default 1.0f.
floatgroundOffsetfoot height above hit point Default 0.0f.
boolalignToNormaloverrides targetRotation each tick Default true.
uint32_traycastLayerMaskPlayer (layer 2) is cleared, matching CameraControllerComponent. The ray starts raycastUp above the ankle, which is inside the character's own capsule — and a character now carries a real body in the collision world, so an all-layers mask planted every foot on the capsule's bottom cap instead of the floor. Default 0xFFFFFFFBu.
floatfootIkAuthoredWeightRuntime weight state for auto foot-IK. The authored chain weight is captured once so a raycast miss can ease the runtime weight to zero and a later hit can ease it back to the AUTHORED value — the old code wrote a hard 0/1, destroying the authored weight and popping on transitions. Default 0.0f.
boolfootIkAuthoredCapturedDefault false.
boollockPlantedFootFoot locking (UE foot placement's plant lock). While the animated foot moves slower than plantSpeed (m/s, world) it is planted: the IK target stays on the spot where it planted, so turning on the spot or a speed mismatch between clip and movement no longer slides the foot. The lock lets go once the animated foot drifts unlockDistance (m) away or lifts off, and the target eases from the locked spot to the live one over unlockBlendTime seconds. Default false.
floatplantSpeedDefault 0.3f.
floatunlockDistanceDefault 0.25f.
floatunlockBlendTimeDefault 0.15f.
boolfootLockedRuntime lock state. Default false.
Vec3footLockPositionDefault Vec3(0.0f, 0.0f, 0.0f).
Vec3footLockPreviousDefault Vec3(0.0f, 0.0f, 0.0f).
boolfootLockHasPreviousDefault false.
floatfootUnlockBlendDefault 0.0f.
Generated from Game/Components/IKComponent.h via game.json · Nov 5, 2026Version 1.0.0