x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Stopping UMG buttons from consuming input

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!

Product Version: UE 4.7
Tags:
more ▼

asked Jun 01 '15 at 09:19 PM in C++ Programming

avatar image

PeterB
31 1 4 10

avatar image rohoon Jul 23 '15 at 04:52 AM
  • Would also like to know this.

avatar image DesertEagle_PWN Feb 25 '19 at 07:19 AM

Also experiencing this in UE4.21.1. I'm trying to use controller events to auto-detect Gamepad or Keyboard/Mouse, but it appears the buttons consume input so I can't update my state control via the input events for keyboard/mouse keys.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Same problem here. Works on Windows but as soon as I deploy it on Android it seems like I don't even get proper screen coordinates for the touch event and therefore my object is spawned at the location I pressed last on the screen which is no umg element.

more ▼

answered Nov 16 '15 at 03:05 PM

avatar image

E1andri1
96 6 10 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question