Navigation
API > API/Plugins > API/Plugins/MassCharacterTrajectory
Shared configuration for trajectory generation. Controls how many samples are recorded and predicted, and at what interval.
The total trajectory has NumHistorySamples + 1 + NumPredictionSamples samples:
- NumHistorySamples past positions (recorded each frame)
- 1 "current" sample at t=DeltaTime (the predicted end-of-frame position)
- NumPredictionSamples future positions spaced by PredictionSamplingInterval
Added to entities by UCharacterTrajectoryTrait. Used by both USpringMovementToCharacterTrajectoryProcessor and UMovementToCharacterTrajectoryProcessor.
| Name | FCharacterTrajectoryParameters |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassCharacterTrajectory/Public/MassCharacterTrajectoryFragments.h |
| Include Path | #include "MassCharacterTrajectoryFragments.h" |
Syntax
USTRUCT ()
struct FCharacterTrajectoryParameters : public FMassConstSharedFragment
Inheritance Hierarchy
- FMassElement → FMassConstSharedFragment → FCharacterTrajectoryParameters
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NumHistorySamples | int32 | Number of past positions to record. | MassCharacterTrajectoryFragments.h |
|
| NumPredictionSamples | int32 | Number of future prediction samples to generate beyond the current frame. | MassCharacterTrajectoryFragments.h |
|
| Offset | FTransform | Additional transform offset applied when computing the trajectory. | MassCharacterTrajectoryFragments.h |
|
| PredictionSamplingInterval | float | Time in seconds between each prediction sample. | MassCharacterTrajectoryFragments.h |
|