Hi!
I have a mobile game with an interactive UI done in UMG and some game logic that reacts to input underneath.
I’m binding input events in my PlayerController like this:
InputComponent->BindTouch(EInputEvent::IE_Pressed, this, &AHW_PlayerController::TouchBegin);
InputComponent->BindTouch(EInputEvent::IE_Repeat, this, &AHW_PlayerController::TouchMove);
InputComponent->BindTouch(EInputEvent::IE_Released, this, &AHW_PlayerController::TouchEnd);
The problem is that buttons in the UI block input events from reaching the controller. So if a player starts dragging in the gameplay area but lets go while on top of a button my controller never gets a TouchEnd event. Likewise if a player starts dragging while on a button I never get a TouchBegin etc.
Is there a way to remedy this? I.e. make the buttons not consume input events, but have them still react like normal buttons firing their own OnClick logic etc.
Thanks!