RealDocs

UKismetInputLibrary::PointerEvent_IsTouchEvent

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

Description

Returns true if this pointer event originated from a touch input rather than a mouse.

Caveats & Gotchas

  • Some platforms synthesize mouse events from touch input at the OS level, in which case this may still read false — test on the target platform rather than assuming touch is always flagged.
  • Useful for branching UI behavior (e.g. bigger hit targets) between touch and desktop mouse without maintaining separate input paths.

Signature

static bool PointerEvent_IsTouchEvent(const FPointerEvent& Input);

Parameters

Name Type Description Default
Input const FPointerEvent& The pointer event to test.

Return Type

bool

Example

Enlarge hit targets for touch input C++
FReply UMyWidget::NativeOnMouseButtonDown(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent)
{
    if (UKismetInputLibrary::PointerEvent_IsTouchEvent(InMouseEvent))
    {
        SetHitTargetPadding(TouchHitPadding);
    }
    return FReply::Unhandled();
}

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.