class

FFeetAnchoredBody

The placeholder body of anything whose origin is its feet: a character controller (its Jolt capsule is lifted by half its height), a nav agent (Detour writes the navmesh surface point into its position). The built-in "capsule" and "cylinder" primitives are centred on their origin and two metres tall, so drawn as they are such a body stood half underground at the wrong size. FitAll rebuilds them at the body's radius and height with their base on the origin every frame the size changed, and lifts any other primitive so its lowest point rests on the feet. Mesh assets keep their own pivot: an imported character (the mannequin) is authored feet-down already.

Module
Game
Header
#include "Game/FeetAnchoredBody.h"
Namespace
Mowo

Type aliases

AliasDescription
using FVisit = void (*)(void* context, EntityID entity, float radius, float height)
using FSource = void (*)(World& world, FVisit visit, void* context)A module above Game (AINavigation) reports the feet-anchored entities it owns through this; character controllers are built in. Process-lifetime and captureless, the FAISignals rule. An entity reported twice keeps the last size, and the built-in source runs last.

Public functions

ReturnsNameDescription
voidAddSource
boolIsSizedPrimitive
Mat4LocalTransformWhat the body of this size draws with, relative to the entity origin.
boolMatchesSizeTrue when the mesh already has the extents of a primitive of this size.
voidFitFits one entity's renderer; a mesh is only rebuilt when the renderer is up and the entity already draws the primitive, so the material the hydration pass hands it is never skipped.
voidFitAll

Function details

AddSource

C++
static void AddSource(FSource source)

IsSizedPrimitive

C++
static bool IsSizedPrimitive(const std::string& meshType)

LocalTransform

C++
static Mat4 LocalTransform(const std::string& meshType, float radius, float height, const GPUMesh* mesh)

What the body of this size draws with, relative to the entity origin.

MatchesSize

C++
static bool MatchesSize(const GPUMesh& mesh, float radius, float height)

True when the mesh already has the extents of a primitive of this size.

Fit

C++
static void Fit(MeshRendererComponent& mesh, float radius, float height)

Fits one entity's renderer; a mesh is only rebuilt when the renderer is up and the entity already draws the primitive, so the material the hydration pass hands it is never skipped.

FitAll

C++
static void FitAll(World& world)
Generated from Game/FeetAnchoredBody.h via game.json · Nov 5, 2026Version 1.0.0