unreal.CharacterTrajectoryParameters¶
- class unreal.CharacterTrajectoryParameters¶
Bases:
MassConstSharedFragmentShared 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.
C++ Source:
Plugin: MassGameplay
Module: MassCharacterTrajectory
File: MassCharacterTrajectoryFragments.h
Editor Properties: (see get_editor_property/set_editor_property)
num_history_samples(int32): [Read-Write] Number of past positions to record. Each frame the oldest sample is discarded and the current position is pushed into history.num_prediction_samples(int32): [Read-Write] Number of future prediction samples to generate beyond the current frame.offset(Transform): [Read-Write] Additional transform offset applied when computing the trajectory. Useful in actor-less contexts where the mesh-to-world offset cannot be deduced automatically from a SkeletalMeshComponent.prediction_sampling_interval(float): [Read-Write] Time in seconds between each prediction sample.