unreal.MotionTrajectoryBlueprintLibrary
¶
- class unreal.MotionTrajectoryBlueprintLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Motion Trajectory Blueprint Library
C++ Source:
Plugin: MotionTrajectory
Module: MotionTrajectory
File: MotionTrajectoryLibrary.h
- classmethod debug_draw_trajectory(actor, world_transform, trajectory, prediction_color=[0.000000, 1.000000, 0.000000, 1.000000], history_color=[0.000000, 0.000000, 1.000000, 1.000000], transform_scale=10.000000, transform_thickness=2.000000, arrow_scale=0.025000, arrow_size=40.000000, arrow_thickness=2.000000) None ¶
Projects trajectory samples onto a defined set of allowed directions
- Parameters:
actor (Actor) –
world_transform (Transform) – Input world transform to establish a world-space basis for drawing the trajectory
trajectory (TrajectorySampleRange) – Input trajectory range
prediction_color (LinearColor) – Input prediction color to interpolate sample drawing towards
history_color (LinearColor) – Input historical color to interpolate sample drawing towards
transform_scale (float) –
transform_thickness (float) –
arrow_scale (float) – Input sample velocity draw scale
arrow_size (float) – Input sample arrow draw size
arrow_thickness (float) – Input sample arrow draw thickness
- classmethod flatten_trajectory2d(trajectory) TrajectorySampleRange ¶
Removes the Z axis motion contribution from a trajectory range
- Parameters:
trajectory (TrajectorySampleRange) – Input trajectory range
- Returns:
Z axis flattened, modified trajectory range
- Return type:
- classmethod is_constant_speed_trajectory(trajectory, speed=0.000000, tolerance=0.001000) bool ¶
Returns true if the furthest future sample, at the end of the trajectory, and the present sample, have a velocity magnitude that is within Tolerance of Speed.
- Parameters:
trajectory (TrajectorySampleRange) – Trajectory being evaluated.
speed (float) – Speed that must be matched at present and future for this function to return true
tolerance (float) – How much the trajectory speed can deviate from Speed
- Returns:
True if the trajectory is at the desired speed.
- Return type:
- classmethod is_starting_trajectory(trajectory, move_min_speed=1.000000, idle_max_speed=0.000000) bool ¶
Returns true if the furthest past sample, at the beginning of the trajectory, has velocity magnitude below IdleMaxSpeed and present speed above MoveMinSpeed.
- Parameters:
trajectory (TrajectorySampleRange) – Trajectory being evaluated.
move_min_speed (float) – Minimum current speed required for this function to return true.
idle_max_speed (float) – Maximum speed at the furthest past sample for this function to return true.
- Returns:
True if a start is detected; false otherwise.
- Return type:
- classmethod is_stopping_trajectory(trajectory, move_min_speed=1.000000, idle_max_speed=0.000000) bool ¶
Returns true if the furthest future sample, at the end of the trajectory, has velocity magnitude below IdleMaxSpeed and present speed above MoveMinSpeed.
- Parameters:
trajectory (TrajectorySampleRange) –
move_min_speed (float) –
idle_max_speed (float) –
- Return type:
- classmethod make_trajectory_relative_to_component(actor_trajectory, component) TrajectorySampleRange ¶
Rotates the trajectory to make it relative to the component specified as a parameter
- Parameters:
actor_trajectory (TrajectorySampleRange) –
component (SceneComponent) – Component whose transform will be the new trajectory reference frame
- Returns:
Trajectory relative to Component
- Return type:
- classmethod rotate_trajectory(trajectory, rotation) TrajectorySampleRange ¶
Rotates the trajectory
- Parameters:
trajectory (TrajectorySampleRange) – Input trajectory range
rotation (Quat) – Rotation to be applied to all trajectory samples
- Returns:
Rotated trajectory
- Return type: