RealDocs

UKismetInputLibrary::PointerEvent_GetUserIndex

function Engine Blueprint Since unknown
#include "Kismet/KismetInputLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns the index of the local user (controller/player) that generated this pointer event, for local multiplayer or split-screen input routing.

Caveats & Gotchas

  • Always 0 in single-player setups or when the platform doesn't distinguish per-user pointer input, so don't use it alone to detect multi-user configurations.
  • Distinct from PointerEvent_GetPointerIndex, which identifies the finger/pointer rather than the owning user.

Signature

static int32 PointerEvent_GetUserIndex(const FPointerEvent& Input);

Parameters

Name Type Description Default
Input const FPointerEvent& The pointer event to read the originating user index from.

Return Type

int32

Example

Focus the correct split-screen pane on click C++
FReply UMyWidget::NativeOnMouseButtonDown(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent)
{
    const int32 UserIndex = UKismetInputLibrary::PointerEvent_GetUserIndex(InMouseEvent);
    FocusSplitScreenPane(UserIndex);
    return FReply::Handled();
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.