FScopedMovementUpdate

Inheritance Hierarchy

FNoncopyable

FScopedMovementUpdate

Syntax

class FScopedMovementUpdate : private FNoncopyable

Remarks

FScopedMovementUpdate creates a new movement scope, within which propagation of moves may be deferred until the end of the outermost scope that does not defer updates. Moves within this scope will avoid updates such as UpdateBounds(), OnUpdateTransform(), UpdatePhysicsVolume(), UpdateChildTransforms() etc until the move is committed (which happens when the last deferred scope goes out of context).

Note that non-deferred scopes are not allowed within outer scopes that defer updates, and any attempt to use one will change the inner scope to use deferred updates.

Variables

Name Description

Protected variable

uint32 : 1

 

bDeferUpdates

Protected variable

uint32 : 1

 

bHasMoved

Protected variable

uint32 : 1

 

bHasTeleported

Protected variable

TBlockingHitArr ...

 

BlockingHits

All overlaps encountered during the scope of moves.

Protected variable

uint32 : 1

 

bRequireOverlapsEventFlag

Protected variable

EOverlapState

 

CurrentOverlapState

Protected variable

int32

 

FinalOverlapCandidatesIndex

Protected variable

FVector

 

InitialRelativeLocation

Protected variable

FRotator

 

InitialRelativeRotation

Protected variable

FVector

 

InitialRelativeScale

Protected variable

FTransform

 

InitialTransform

Protected variable

FScopedMovement ...

 

OuterDeferredScope

Protected variable

USceneComponent ...

 

Owner

Protected variable

TArray < FOverla ...

 

PendingOverlaps

If not INDEX_NONE, overlaps at this index and beyond in PendingOverlaps are at the final destination.

Constructors

Name Description

Public function

FScopedMovementUpdate

(
    USceneComponent * Component,
    EScopedUpdate::Type ScopeBehavior,
    bool bRequireOverlapsEventFlagToQue...
)

Destructors

Name Description

Public function

~FScopedMovementUpdate()

Functions

Name Description

Public function

void

 

AppendBlockingHitAfterMove

(
    const FHitResult & Hit
)

Add blocking hit that will get processed once the move is committed.

Public function

void

 

AppendOverlapsAfterMove

(
    const TArray < FOverlapInfo >& NewP...,
    bool bSweep,
    bool bIncludesOverlapsAtEnd
)

--------------------------------------------------------------------------------------------------// These methods are intended only to be used by SceneComponent and derived classes.

Public function

void

 

ForceOverlapUpdate()

Force full overlap update once this scope finishes.

Public function

const FScope ...

 

GetOuterDeferredScope()

FScopedMovementUpdate inlines.

Protected function

const TArray ...

 

GetOverlapsAtEnd

(
    UPrimitiveComponent & PrimComponent,
    TArray < FOverlapInfo >& EndOverlap...,
    bool bTransformChanged
)

Public function

const TBlock ...

 

GetPendingBlockingHits()

Returns the list of pending blocking hits, which will be used for notifications once the move is committed.

Public function

const TArray ...

 

GetPendingOverlaps()

Returns the pending overlaps within this scope.

Public function

bool

 

HasMoved

(
    EHasMovedTransformOption CheckTrans...
)

Returns whether movement has occurred at all during this scope, optionally checking if the transform is different (since changing scale does not go through a move).

Public function

bool

 

HasPendingOverlaps()

Returns true if there are pending overlaps queued in this scope.

Public function

void

 

InvalidateCurrentOverlaps()

Clear overlap state at current location, we don't know what it is.

Public function

bool

 

IsDeferringUpdates()

Return true if deferring updates, false if updates are applied immediately.

Public function

bool

 

IsTransformDirty()

Returns true if the Component's transform differs from that at the start of the scoped update.

Public function

void

 

KeepCurrentOverlapsAfterRotation

(
    bool bSweep
)

Keep current pending overlaps after a move but make note that there was movement (just a symmetric rotation).

Public function

bool

 

RequiresOverlapsEventFlag()

Returns true if we require bGenerateOverlapEvents on both the moving object and the overlapped object to add them to the pending overlaps list.

Public function

void

 

RevertMove()

Revert movement to the initial location of the Component at the start of the scoped update.

Public function

void

 

SetHasTeleported()

Registers that this move is a teleport

Protected function

bool

 

SetWorldLocationAndRotation

(
    FVector NewLocation,
    const FQuat & NewQuat,
    bool bNoPhysics,
    ETeleportType Teleport
)

Enums

Typedefs

Name

Description

TBlockingHitArray

References

Module

Engine

Header

Runtime/Engine/Classes/Components/SceneComponent.h