UKismetInputLibrary::PointerEvent_GetPointerIndex
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the unique identifier of the pointer that raised this event — for touch input this is typically the finger index.
Caveats & Gotchas
- • For standard single-cursor mouse input this is usually 0 and not useful; it matters mainly when handling multi-touch gestures.
- • Pointer indices are only guaranteed unique among pointers that are simultaneously active, not across the lifetime of the app.
Signature
static int32 PointerEvent_GetPointerIndex(const FPointerEvent& Input); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Input | const FPointerEvent& | The pointer event to read the pointer identifier from. | — |
Return Type
int32 Example
Track individual touches by finger index C++
FReply UMyWidget::NativeOnTouchStarted(const FGeometry& InGeometry, const FPointerEvent& InTouchEvent)
{
const int32 FingerIndex = UKismetInputLibrary::PointerEvent_GetPointerIndex(InTouchEvent);
TrackActiveTouch(FingerIndex, InTouchEvent);
return FReply::Handled();
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?