FCharacterRootMotionStepper
- Module
- Game
- Header
#include "Game/CharacterRootMotionStepper.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr uint32_t | kMaxSourceClips | Default 4. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Bind | Anchors the fixed clock at anchorPhase01 of the representative clip's cycle. |
void | Unbind | |
bool | IsBound | |
bool | MatchesSource | Same clip identities in the same order; weights are allowed to differ (a blend space slides them every frame without changing the cycle). |
void | SetWeights | |
void | FixedStep | One fixed step: advance the clock by stepSeconds (play rate already applied) and return the root delta over exactly that interval, in the root bone's local space. |
void | PeekStep | |
FFrameResult | AdvanceFrame | The frame driver: runs the steps the physics loop will run this frame (mirroring its accumulator) and returns the published delta. |
uint32_t | StepsForFrame | How many fixed steps PhysicsSystem::Update runs for a frame of frameDt with bankedSeconds already in its accumulator, including its catch-up cap. |
float | GetPhase | |
float | GetCycleSeconds |
Function details
Bind
void Bind(const Skeleton* skeleton, const FSourceClip* clips, uint32_t count, uint32_t representative, bool loop, float anchorPhase01)Anchors the fixed clock at anchorPhase01 of the representative clip's cycle. Call again whenever the composition's clip identities change (a state switch, a montage taking over) so the clock re-anchors on the pose's own time instead of running on from the previous clip's.
Unbind
void Unbind()IsBound
bool IsBound() constMatchesSource
bool MatchesSource(const FSourceClip* clips, uint32_t count) constSame clip identities in the same order; weights are allowed to differ (a blend space slides them every frame without changing the cycle).
SetWeights
void SetWeights(const FSourceClip* clips, uint32_t count)FixedStep
void FixedStep(float stepSeconds, Vec3& outDeltaPosition, Quat& outDeltaRotation)One fixed step: advance the clock by stepSeconds (play rate already applied) and return the root delta over exactly that interval, in the root bone's local space. A loop seam inside the step is split so the wrap loses nothing; a step longer than the cycle folds whole cycles in.
PeekStep
void PeekStep(float stepSeconds, Vec3& outDeltaPosition, Quat& outDeltaRotation) constAdvanceFrame
FFrameResult AdvanceFrame(float frameDt, float fixedDt, float bankedSeconds, uint32_t maxSteps, float playRate)The frame driver: runs the steps the physics loop will run this frame (mirroring its accumulator) and returns the published delta.
StepsForFrame
static uint32_t StepsForFrame(float bankedSeconds, float frameDt, float fixedDt, uint32_t maxSteps)How many fixed steps PhysicsSystem::Update runs for a frame of frameDt with bankedSeconds already in its accumulator, including its catch-up cap. The arithmetic is the physics loop's own, in the same order, so the two agree at every float boundary.
GetPhase
float GetPhase() constGetCycleSeconds
float GetCycleSeconds() const