# Is it possible to set up multiple hit boxes in a 2D environment?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355>\
**Category:** Asset Creation\
**Tags:** onclick, multiple, unreal-engine, hitbox, question\
**Created:** [August 18, 2014, 7:57pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355 "2014-08-18T19:57:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Airner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Airner](https://forums.unrealengine.com/u/Airner)\
**Post date:** [August 18, 2014, 7:57pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/1 "2014-08-18T19:57:16Z")

</div>

Hi there,

I set up three onclick hitboxes for 3 buttons in a 2D environment. For some reason only the first one in the line works, the other two doesn’t. If I rewire them, I got the same result: whichever is first in line works, the other two is like they aren’t there. Is it possible to wire them in a way so all three will be clickable?

I appreciate any help 🙂

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 18, 2014, 8:07pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/2 "2014-08-18T20:07:53Z")

</div>

Hi Airner,

Which version of the editor are you using and could you also post a screenshot of you blueprint setup as well.

---

<div class="post-metadata">

**Author:** ![Airner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Airner](https://forums.unrealengine.com/u/Airner)\
**Post date:** [August 19, 2014, 3:45am UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/3 "2014-08-19T03:45:32Z")

</div>

Hi TJ,

thanks for your quick response. I use the latest 4.4.0 version of the editor.

As you can see on the screenshot, the event is now connected to the “Leftbuttonidle” hitbox, but when I hit Play, only the “HYPEbuttonidle” hitbox is clickable.

 ![13114-hitboxes01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/f/28f1b44f0c689f65f63beae8ac815a32d6913933.jpeg)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 19, 2014, 2:42pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/4 "2014-08-19T14:42:05Z")

</div>

Hi Airner,

I believe what you are seeing is OnClick attempting to name the LeftButtonIdle hitbox to the name of the last box you clicked on. To better see what is going on, while playing hit the ~ key to bring up the Console Command prompt and type ‘showdebug hitbox’.

I would suggest just naming your hitboxes manually because when OnClick is called it gets the name of the hitbox you clicked automatically. Try the setup below to see this in action (minus the coordinates and size of course).

 ![13126-ahub_hitboxes.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/5/3153ff183754a0e45b7d1ed2d32f847fcfb541be.jpeg)

---

<div class="post-metadata">

**Author:** ![Airner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Airner](https://forums.unrealengine.com/u/Airner)\
**Post date:** [August 20, 2014, 5:09am UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/5 "2014-08-20T05:09:30Z")

</div>

Hi TJ,

I tried the blueprint above, but unfortunately the problem still the same: only the HYPEbuttonidle works, the other 2 does not react to clicks 😕 any other idea what might be the problem?

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 20, 2014, 1:19pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/6 "2014-08-20T13:19:47Z")

</div>

Try creating a new HUD blueprint and testing it there, it is possible that your blueprint could have gotten corrupted. If it still doesn’t work, try testing it in a new project. This method should work just fine in 4.4.

---

<div class="post-metadata">

**Author:** ![Airner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Airner](https://forums.unrealengine.com/u/Airner)\
**Post date:** [August 21, 2014, 6:19am UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/7 "2014-08-21T06:19:03Z")

</div>

I did that, created a new HUD blueprint, set it in my game as hud, made an exact copy of your blueprint. Didn’t work. Tried to make a new project with just this blueprint in it, didn’t work either. Any ideas?

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 25, 2014, 3:34pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/8 "2014-08-25T15:34:23Z")

</div>

Hi Airner,

I’m sorry its been a few days.

When you tested this in a new project with my blueprint, nothing could be clicked? Or were you getting your original results where only one box was clickable?

---

<div class="post-metadata">

**Author:** ![Airner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Airner](https://forums.unrealengine.com/u/Airner)\
**Post date:** [August 25, 2014, 3:41pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-set-up-multiple-hit-boxes-in-a-2d-environment/291355/9 "2014-08-25T15:41:59Z")

</div>

the question has been solved since then, anyone struggles with the same problem can find the solution here:

> **[How to connect hitbox buttons instead of keyboard buttons?](https://forums.unrealengine.com/questions/87303/how-to-connect-hitbox-buttons-instead-of-keyboard.html)**
>
> Hi there 🙂 I would like to connect these: with these hitboxes: These are all in one blueprint. Could someone please connect the dots (nodes) for me? I’m stuck here for days now 😕 So instead of Left/Right arrow, I need click events for...
