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"

Why HUD event Receive Hit Box Click need two taps to fire at first time?

Hi Epic Folks!

My question is concerning AHUD::ReceiveHitBoxClick(), either in blueprint or in C++ code (same behaviour). Why does it need two touches/taps on hitbox (on device or in mobile preview) to be initiated and fired the first time? After the event fired once, it just works as expected until the touch/tap goes outside the hitbox... The event works perfectly fine with mouse clicks.

I had a look at the AHUD.cpp and the PlayerController.cpp sources and can't figure out what I'm missing to get it work properly... (it seems that the touch support improve a lot in the 4.2 but this issue remains). Any Idea?

Thx, UE4 is just wonderful!

Product Version: Not Selected
more ▼

asked Jun 19 '14 at 09:29 AM in C++ Programming

avatar image

101 4 11 20

avatar image Tim C ♦♦ STAFF Jun 19 '14 at 10:37 PM

Hi metatomato,

How are you testing this issue? Are you using Mobile Preview in the Editor using UDK Remote with a device?

Are you able to reproduce this issue in a new project from one of the templates? If so, can you provide details about how you set it up so we can reproduce the issue?

avatar image metatomato Jun 20 '14 at 08:53 AM

Hi Tim,

I don't use UDK Remote for testing inputs. Here is my testing configs :

  • PIE New Editor Window : hit hitbox with mouse -> WORKS

  • PIE Mobile Preview : hit hitbox with mouse (touches emulation) -> FAILED

  • On device launch (iPadMini2) : hit hitbox with fingers -> FAILED

I've reproduced it easily from a new project (default blank template). I just setup 3 blueprints (cf attached screenshot) BP_GameMode, BP_PlayerController and BP_HUD.

  • In BP_PlayerController : set bEnableTouchEvents = true

  • In BP_HUD : Create an DrawRect and AddHitBox for DrawHUD Event and a Print String if hitbox name match for Receive Hitbox Click Event.

Same behaviour : needs 2 taps (or emulated clicks in Mobile preview) to initiate the hitbox event firing. After that while hits stay contained in the hitbox, works as expected. alt text

avatar image Tim C ♦♦ STAFF Jun 20 '14 at 11:07 PM

Hi metatomato,

Thank you for the clear reproduction instructions. I was able to easily reproduce the exact behavior that you described. I am providing this information to the development team for further investigation.

avatar image ederoliveira20 Sep 14 '15 at 01:57 AM

I noticed that the Hitboxes works with touch events but only the event hit box receive click works n the first touch, the event receive hitbox release works with 2 quick touchs, I thinks the first touch set the cursor position and the second one fires the event when the touch ends. Does Unreal checked on this already?

avatar image Steve_T Sep 14 '15 at 03:37 PM

It wouldn't be something to do with the Is Focusable settings? I had buttons that did this kind of thing until I unticked the Is Focusable button for that component.

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

0 answers: sort voted first
Be the first one to answer this question
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