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

**URL:** <https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303>\
**Category:** UI\
**Tags:** hud, Mobile, unreal-engine, iOS, touch, hitbox, question\
**Created:** [June 19, 2014, 9:29am UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303 "2014-06-19T09:29:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![metatomato\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@metatomato\_1](https://forums.unrealengine.com/u/metatomato_1)\
**Post date:** [June 19, 2014, 9:29am UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/1 "2014-06-19T09:29:55Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [June 19, 2014, 10:37pm UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/2 "2014-06-19T22:37:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![metatomato\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@metatomato\_1](https://forums.unrealengine.com/u/metatomato_1)\
**Post date:** [June 20, 2014, 8:53am UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/3 "2014-06-20T08:53:38Z")

</div>

Hi ,

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.

 ![8845-screen+shot+2014-06-20+at+10.34.07.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/9/f894b617bf048ad733eee70f971d44c0a7b92f1c.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [June 20, 2014, 11:07pm UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/4 "2014-06-20T23:07:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ederoliveira20](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ederoliveira20](https://forums.unrealengine.com/u/ederoliveira20)\
**Post date:** [September 14, 2015, 1:57am UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/5 "2015-09-14T01:57:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Steve\_T](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_T](https://forums.unrealengine.com/u/Steve_T)\
**Post date:** [September 14, 2015, 3:37pm UTC](https://forums.unrealengine.com/t/why-hud-event-receive-hit-box-click-need-two-taps-to-fire-at-first-time/286303/6 "2015-09-14T15:37:58Z")

</div>

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.
