unreal.GroundMovementUtils¶
- class unreal.GroundMovementUtils(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryGroundMovementUtils: a collection of stateless static BP-accessible functions for a variety of ground movement-related operations
C++ Source:
Plugin: Mover
Module: Mover
File: GroundMovementUtils.h
- classmethod compute_controlled_ground_move(params) ProposedMove¶
Generate a new movement based on move/orientation intents and the prior state, constrained to the ground movement plane. Also applies deceleration friction as necessary.
- Parameters:
params (GroundMoveParams)
- Return type:
- classmethod compute_deflected_move_onto_ramp(orig_move_delta, up_direction, ramp_hit_result, max_walk_slope_cosine, hit_from_line_trace) Vector¶
Used to change a movement to be along a ramp’s surface, typically to prevent slow movement when running up/down a ramp
- classmethod test_grounded_move_along_hit_surface(moving_comps, original_move_delta, location_at_hit, target_rotation, handle_impact, max_step_height, max_walk_slope_cosine, out_hit, out_move_record) -> (float, out_hit=HitResult, out_move_record=MovementRecord)¶
Tests a potential movement along a walkable surface. Modifies InOutHit with final movement hit data Appends to InOutMoveRecord with any movement substeps Returns the percent of time applied, with 0.0 meaning no movement would occur.
- Parameters:
moving_comps (MovingComponentSet)
original_move_delta (Vector)
location_at_hit (Vector)
target_rotation (Quat)
handle_impact (bool)
max_step_height (float)
max_walk_slope_cosine (float)
out_hit (HitResult)
out_move_record (MovementRecord)
- Returns:
out_hit (HitResult):
out_move_record (MovementRecord):
- Return type:
tuple
- classmethod test_move_to_adjust_to_floor(moving_comps, location, rotation, max_walk_slope_cosine, out_current_floor, out_move_record) -> (Vector, out_current_floor=FloorCheckResult, out_move_record=MovementRecord)¶
Tests potential movement of a component up/down to adjust to a walkable floor. Intended for use while performing ground movement. Modifies InOutCurrentFloor to account for adjustments, if any was made Appends to InOutMoveRecord with any movement substeps Returns new location, including any adjustment if it was made
- Parameters:
moving_comps (MovingComponentSet)
location (Vector)
rotation (Quat)
max_walk_slope_cosine (float)
out_current_floor (FloorCheckResult)
out_move_record (MovementRecord)
- Returns:
out_current_floor (FloorCheckResult):
out_move_record (MovementRecord):
- Return type:
tuple
- classmethod test_move_to_keep_min_height_above_floor(moving_comps, location, rotation, max_walk_slope_cosine, out_current_floor, out_move_record) -> (Vector, out_current_floor=FloorCheckResult, out_move_record=MovementRecord)¶
Tests potential vertical movement of a component to float a bit above a walkable floor. Intended for use while moving along ground surfaces. Modifies InOutCurrentFloor to account for adjustments, if any was made Appends to InOutMoveRecord with any movement substeps Returns new location, including any adjustment if it was made
- Parameters:
moving_comps (MovingComponentSet)
location (Vector)
rotation (Quat)
max_walk_slope_cosine (float)
out_current_floor (FloorCheckResult)
out_move_record (MovementRecord)
- Returns:
out_current_floor (FloorCheckResult):
out_move_record (MovementRecord):
- Return type:
tuple
- classmethod try_walk_to_slide_along_surface(moving_comps, delta, pct_of_delta_to_move, rotation, normal, hit, handle_impact, move_record, max_walk_slope_cosine, max_step_height) -> (float, hit=HitResult, move_record=MovementRecord)¶
Attempts to move a component along a surface in the walking mode. Returns the percent of time applied, with 0.0 meaning no movement occurred. Note: This modifies the normal and calls UMovementUtils::TryMoveToSlideAlongSurface
- Parameters:
moving_comps (MovingComponentSet)
delta (Vector)
pct_of_delta_to_move (float)
rotation (Quat)
normal (Vector)
hit (HitResult)
handle_impact (bool)
move_record (MovementRecord)
max_walk_slope_cosine (float)
max_step_height (float)
- Returns:
hit (HitResult):
move_record (MovementRecord):
- Return type:
tuple