URiveWidget consumes all touch input, so touches never reach the game viewport

Environment

- Rive Unreal plugin 0.4.26

- Unreal Engine 5.8, Win64

- Touch input tested from an iPad through Pixel Streaming 2 (the same thing would happen on any real touch device)

Problem

We have a full-screen URiveWidget used as the UI layer (a side menu over a 3D scene). With a mouse everything works: clicks on the menu are handled by Rive, and clicks anywhere else reach the game, so camera controls work.

With touch, only the Rive menu responds. No touch ever reaches the game viewport, so Touch1/Touch2 key events and Enhanced Input touch actions never fire on the pawn.

Root cause

In Source/Rive/Private/UMG/RiveWidget.cpp, the mouse handler only consumes the event when it hits something in the artboard:

if (!RiveArtboard->PointerDown(...))

{

return FReply::Unhandled();

}

return FReply::Handled()...;

The touch handlers (NativeOnTouchStarted, NativeOnTouchMoved, NativeOnTouchEnded) always return FReply::Handled(), whether or not the touch hit anything in the artboard. Since the widget covers the whole screen, it swallows every touch and Slate never routes it on to the viewport.

Fix

Apply the same rule to touch as to mouse: consume a touch only if it starts on something in the artboard. To handle multi-touch correctly, keep track of which pointer indices started on the artboard, so move and end events are only consumed for those fingers. The others fall through to the game, so one finger can use the menu while another drags the camera.

Public/UMG/RiveWidget.h, private section:

// Touches that started on something in the artboard. Only these are

// consumed; the rest fall through to the viewport (game touch input).

TSet<int32> ArtboardTouches;

Private/UMG/RiveWidget.cpp:

FReply URiveWidget::NativeOnTouchStarted(const FGeometry& InGeometry,

const FPointerEvent& InGestureEvent)

{

Super::NativeOnTouchStarted(InGeometry, InGestureEvent);

// Same rule as NativeOnMouseButtonDown: consume only touches that hit

// something in the artboard, so touches on empty areas reach the game.

if (!IsValid(RiveArtboard) ||

!RiveArtboard->PointerDown(GetCachedGeometry(),

RiveDescriptor,

InGestureEvent,

UWidgetLayoutLibrary::GetViewportScale(this)))

{

return FReply::Unhandled();

}

ArtboardTouches.Add(InGestureEvent.GetPointerIndex());

return FReply::Handled();

}

FReply URiveWidget::NativeOnTouchMoved(const FGeometry& InGeometry,

const FPointerEvent& InGestureEvent)

{

Super::NativeOnTouchMoved(InGeometry, InGestureEvent);

if (!ArtboardTouches.Contains(InGestureEvent.GetPointerIndex()))

{

return FReply::Unhandled();

}

if (IsValid(RiveArtboard))

{

RiveArtboard->PointerMove(GetCachedGeometry(),

RiveDescriptor,

InGestureEvent,

UWidgetLayoutLibrary::GetViewportScale(this));

}

return FReply::Handled();

}

FReply URiveWidget::NativeOnTouchEnded(const FGeometry& InGeometry,

const FPointerEvent& InGestureEvent)

{

Super::NativeOnTouchEnded(InGeometry, InGestureEvent);

if (!ArtboardTouches.Remove(InGestureEvent.GetPointerIndex()))

{

return FReply::Unhandled();

}

if (IsValid(RiveArtboard))

{

RiveArtboard->PointerUp(GetCachedGeometry(),

RiveDescriptor,

InGestureEvent,

UWidgetLayoutLibrary::GetViewportScale(this));

}

return FReply::Handled();

}

Result

Touches on Rive elements still drive the state machine (buttons, hover, listeners). Touches on empty or transparent areas now pass through to the viewport, and multi-touch works across UI and game at the same time.

It would be great to have this behavior upstream, or at least as a widget option like "Consume all touch input" (on/off). I have fixed it on my build with a little Claude help.