Navigation
API > API/Plugins > API/Plugins/Mover > API/Plugins/Mover/UMovementUtils
Description
Attempts to move a component and resolve any penetration issues with the proposed move Delta. This function handles blocking moves and slides along the surface or stops on impact. It uses @TryMoveToSlideAlongSurface to slide along the surface on hit, so if other behavior is needed for sliding (like Falling based sliding) consider using @TrySafeMoveUpdatedComponent and a slide function or setting @bSlideAlongSurface to false and then using a separate sliding function. Note: This function doesn't update a movement record so velocity should be gathered/set using a different method
| Name | TrySafeMoveAndSlideUpdatedComponentNoMovementRecord |
| Type | function |
| Header File | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/MoveLibrary/MovementUtils.h |
| Include Path | #include "MoveLibrary/MovementUtils.h" |
| Source | /Engine/Plugins/Experimental/Mover/Source/Mover/Private/MoveLibrary/MovementUtils.cpp |
UFUNCTION (BlueprintCallable, Category=Mover,
Meta=(DisplayName="Try Safe Move And Slide (No Movement Record)"))
static float TrySafeMoveAndSlideUpdatedComponentNoMovementRecord
(
const FMovingComponentSet & MovingComps,
const FVector & Delta,
const FQuat & NewRotation,
bool bSweep,
FHitResult & OutHit,
ETeleportType Teleport,
bool bSlideAlongSurface
)
Returns the percent of the move applied 0 to 1, where 1 represents the whole move being applied
Parameters
| Name | Remarks |
|---|---|
| MovingComps | Encapsulates components involved in movement |
| Delta | The desired location change in world space |
| NewRotation | The new desired rotation in world space |
| bSweep | Whether we sweep to the destination location |
| OutHit | Optional output describing the blocking hit that stopped the move, if any |
| Teleport | Whether we teleport the physics state (if physics collision is enabled for this object) |
| bSlideAlongSurface | If true the actor slides along a blocking surface. If false the actor will stop if the move was blocked |