FScopedMovementUpdate

[FScopedMovementUpdate](API\Runtime\Engine\Components\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.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/SceneComponent.h

Include

#include "Components/SceneComponent.h"

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).

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

uint8: 1

 

bDeferUpdates

Protected variable

uint8: 1

 

bHasMoved

Protected variable

TScopedBlocking...

 

BlockingHits

Protected variable

uint8: 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

TScopedOverlapI...

 

PendingOverlaps

Protected variable

ETeleportType

 

TeleportType

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 TOverlapArrayView& NewPendin...,
    bool bSweep,
    bool bIncludesOverlapsAtEnd
)

Add overlaps to the queued overlaps array.

Public function

void

 

ForceOverlapUpdate()

Force full overlap update once this scope finishes.

Public function Const

const FScope...

 

GetOuterDeferredScope()

Get the scope containing this scope. A scope only has an outer scope if they both defer updates.

Protected function Const

TOptional< T...

 

GetOverlapsAtEnd

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

Fills in the list of overlaps at the end location (in EndOverlaps).

Public function Const

const TScope...

 

GetPendingBlockingHits()

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

Public function Const

const TScope...

 

GetPendingOverlaps()

Returns the pending overlaps within this scope.

Public function Const

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 Const

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 Const

bool

 

IsDeferringUpdates()

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

Public function Const

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

Public function Const

bool

 

RequiresOverlapsEventFlag()

Returns true if we require GetGenerateOverlapEvents() 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

(
    ETeleportType InTeleportType
)

Registers that this move is a teleport

Protected function

bool

 

SetWorldLocationAndRotation

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

Enums

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss