class
FTrajectoryPredictor
Spring-damper projection of the character's desired velocity into the future trajectory the search asks for. Also keeps the past window the schema needs.
- Module
- Animation
- Header
#include "Animation/MotionMatching.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
float | velocityHalfLife | Default 0.15f. |
float | facingHalfLife | Default 0.1f. |
float | predictionStep | Default 1.0f / 30.0f. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Reset | |
void | Update | |
void | PredictFuture | Character-space samples (origin = current position, +Y axis = facing). |
void | SamplePast | |
const Vec3& | Velocity | |
const Vec2& | Facing | |
const Vec3& | Position | |
Vec2 | ToCharacterSpace | |
Vec2 | DirectionToCharacterSpace |
Function details
Reset
C++
void Reset(const Vec3& worldPosition, const Vec2& facing)Update
C++
void Update(float dt, const Vec3& worldPosition, const Vec3& desiredVelocity, const Vec2& desiredFacing)PredictFuture
C++
void PredictFuture(const std::vector<float>& horizons, std::vector<Vec2>& outPositions, std::vector<Vec2>& outDirections) constCharacter-space samples (origin = current position, +Y axis = facing).
SamplePast
C++
void SamplePast(const std::vector<float>& horizons, std::vector<Vec2>& outPositions, std::vector<Vec2>& outDirections) constVelocity
C++
const Vec3& Velocity() constFacing
C++
const Vec2& Facing() constPosition
C++
const Vec3& Position() constToCharacterSpace
C++
Vec2 ToCharacterSpace(const Vec3& worldPosition) constDirectionToCharacterSpace
C++
Vec2 DirectionToCharacterSpace(const Vec2& worldDirection) constGenerated from Animation/MotionMatching.h via animation.json · Oct 26, 2026Version 1.0.0