Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FScopedMovementUpdate |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Engine/ScopedMovementUpdate.h |
| Include Path | #include "Engine/ScopedMovementUpdate.h" |
Syntax
class FScopedMovementUpdate : private FNoncopyable
Inheritance Hierarchy
- FNoncopyable → FScopedMovementUpdate
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedMovementUpdate
(
USceneComponent* Component, |
Engine/ScopedMovementUpdate.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScopedMovementUpdate() |
Engine/ScopedMovementUpdate.h |
Enums
Public
| Name | Remarks |
|---|---|
| EHasMovedTransformOption | |
| EOverlapState |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TScopedBlockingHitArray | TArray< FHitResult, TInlineAllocator< 2 > > | Engine/ScopedMovementUpdate.h | |
| TScopedOverlapInfoArray | TArray< FOverlapInfo, TInlineAllocator< 3 > > | Engine/ScopedMovementUpdate.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendBlockingHitAfterMove
(
const FHitResult& Hit |
Add blocking hit that will get processed once the move is committed. | Engine/ScopedMovementUpdate.h | |
void AppendOverlapsAfterMove
(
const TOverlapArrayView& NewPendingOverlaps, |
Add overlaps to the queued overlaps array. | Engine/ScopedMovementUpdate.h | |
void ForceOverlapUpdate() |
Force full overlap update once this scope finishes. | Engine/ScopedMovementUpdate.h | |
int32 GetFinalOverlapCandidatesIndex() |
If not INDEX_NONE, overlaps at this index and beyond in PendingOverlaps are at the final destination | Engine/ScopedMovementUpdate.h | |
bool GetHasMoved() |
True if this scoped movement resulted in the component being moved | Engine/ScopedMovementUpdate.h | |
const FTransform & GetInitialTransform() |
The initial transform when this scoped movement began. | Engine/ScopedMovementUpdate.h | |
const FScopedMovementUpdate * GetOuterDeferredScope() |
Get the scope containing this scope. A scope only has an outer scope if they both defer updates. | Engine/ScopedMovementUpdate.h | |
EOverlapState GetOverlapState() |
The current overlap state of this scoped move. | Engine/ScopedMovementUpdate.h | |
USceneComponent * GetOwner() |
The owning scene component this scoped movement is modifying. | Engine/ScopedMovementUpdate.h | |
const TScopedBlockingHitArray & GetPendingBlockingHits() |
Returns the list of pending blocking hits, which will be used for notifications once the move is committed. | Engine/ScopedMovementUpdate.h | |
const TScopedOverlapInfoArray & GetPendingOverlaps() |
Returns the pending overlaps within this scope. | Engine/ScopedMovementUpdate.h | |
ETeleportType GetTeleportType() |
The type of teleport which this scoped move should use to determine overlaps. | Engine/ScopedMovementUpdate.h | |
bool HasMoved
(
EHasMovedTransformOption CheckTransform |
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). | Engine/ScopedMovementUpdate.h | |
bool HasPendingOverlaps() |
Returns true if there are pending overlaps queued in this scope. | Engine/ScopedMovementUpdate.h | |
void InvalidateCurrentOverlaps() |
Clear overlap state at current location, we don't know what it is. | Engine/ScopedMovementUpdate.h | |
bool IsDeferringUpdates() |
Return true if deferring updates, false if updates are applied immediately. | Engine/ScopedMovementUpdate.h | |
bool IsGroupUpdate() |
Return true if this movement update should be deferred and applied later in the frame as part of a larger group of components. | Engine/ScopedMovementUpdate.h | |
bool IsTransformDirty() |
Returns true if the Component's transform differs from that at the start of the scoped update. | Engine/ScopedMovementUpdate.h | |
void KeepCurrentOverlapsAfterRotation
(
bool bSweep |
Keep current pending overlaps after a move but make note that there was movement (just a symmetric rotation). | Engine/ScopedMovementUpdate.h | |
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. | Engine/ScopedMovementUpdate.h | |
void RevertMove () |
Revert movement to the initial location of the Component at the start of the scoped update. | Engine/ScopedMovementUpdate.h | |
void SetHasTeleported
(
ETeleportType InTeleportType |
Registers that this move is a teleport | Engine/ScopedMovementUpdate.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TOptional< TOverlapArrayView > GetOverlapsAtEnd
(
UPrimitiveComponent& PrimComponent, |
Fills in the list of overlaps at the end location (in EndOverlaps). | Engine/ScopedMovementUpdate.h | |
bool SetWorldLocationAndRotation
(
FVector NewLocation, |
Engine/ScopedMovementUpdate.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void operator delete
(
void* |
Engine/ScopedMovementUpdate.h | ||
void operator delete[]
(
void* |
Engine/ScopedMovementUpdate.h | ||
void * operator new
(
size_t |
This class can only be created on the stack, otherwise the ordering constraints of the constructor and destructor between encapsulated scopes could be violated. | Engine/ScopedMovementUpdate.h | |
void * operator new[]
(
size_t |
Engine/ScopedMovementUpdate.h |