UMageItWorldMarkersSubsystem
Base Class: ULocalPlayerSubsystem
Interfaces: FTickableGameObject
Overview
Section titled “Overview”UMageItWorldMarkersSubsystem is the core management system for handling 3D world markers projected onto the 2D screen. Being a ULocalPlayerSubsystem, it is automatically instantiated per local player, making it highly efficient and easy to access without manual initialization.
It handles marker registration, dynamic visibility testing (with performance-friendly chunking), crosshair interaction, and screen edge behavior.
How to Access
Section titled “How to Access”In Blueprints
Section titled “In Blueprints”Right-click anywhere in an Event Graph and search for Get MageItWorldMarkersSubsystem.
In C++
Section titled “In C++”To access the subsystem in C++, get the local player from the player controller:
if (APlayerController* PC = GetWorld()->GetFirstPlayerController()){ if (ULocalPlayer* LocalPlayer = PC->GetLocalPlayer()) { UMageItWorldMarkersSubsystem* MarkerSubsystem = LocalPlayer->GetSubsystem<UMageItWorldMarkersSubsystem>(); }}Properties (Variables)
Section titled “Properties (Variables)”Optimization & Rendering
Section titled “Optimization & Rendering”bVisibilityTestEnabled (Boolean): Toggles visibility checks (by distance to player) for markers.
MarkerVisibilityTestChunkSize (Integer): Determines how many markers are tested for visibility per frame. This is a crucial optimization setting to prevent framerate drops when hundreds of markers are active. Default is 10.
ScreenEdgeGap (FMargin): The padding/margin from the edge of the screen where markers will clamp when the target object is off-screen.
CachedViewportSize / CachedSafeZone: Read-only properties storing the current screen dimensions and safe area.
Crosshair & Interaction
Section titled “Crosshair & Interaction”bCrosshairInteractionEnabled (Boolean): Enables or disables logic for markers reacting when the player looks at them.
CrosshairInteractionRadius (Float): The screen-space radius around the crosshair where a marker is considered “hovered”.
FocusRadius (Float): A secondary radius used for highlighting or focusing markers near the center of the screen.
MarkerUnderCrosshair: A read-only reference to the specific marker currently targeted by the player.
Methods (Functions)
Section titled “Methods (Functions)”Marker Management
Section titled “Marker Management”RegisterMarker(UMageItWorldMarkerComponent* MarkerComponent)
Registers a new marker to the subsystem. This is usually called automatically on BeginPlay by the Marker Component itself.
UnregisterMarker(UMageItWorldMarkerComponent* MarkerComponent)
Removes the marker from tracking. Automatically called on EndPlay or destruction.
Queries & Arrays
Section titled “Queries & Arrays”GetRegisteredMarkers()
Returns an array of all markers currently tracked by the subsystem, regardless of visibility.
GetVisibleMarkers()
Returns an array of markers that are currently visible on the screen.
GetConditionalVisibilityMarkers()
Returns markers that have dynamic visibility conditions applied.
Setters (Blueprint Callable)
Section titled “Setters (Blueprint Callable)”SetCrosshairInteractionRadius(float NewRadius)
Updates the interaction radius dynamically at runtime (useful for weapon switching or zooming).
SetFocusRadius(float NewRadius)
Updates the focus detection radius.
UpdateMarkerVisibility(UMageItWorldMarkerComponent* MarkerComponent, bool bVisible)
Force-updates the visibility state of a specific marker.