# \[Help needed\] Bounding Box on multiple pawns

**URL:** <https://forums.unrealengine.com/t/help-needed-bounding-box-on-multiple-pawns/408295>\
**Category:** Rendering\
**Tags:** bounding-box, unreal-engine, Rendering, multiple-instance, Blueprint, question\
**Created:** [October 30, 2017, 9:11am UTC](https://forums.unrealengine.com/t/help-needed-bounding-box-on-multiple-pawns/408295 "2017-10-30T09:11:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4cbce934](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4cbce934](https://forums.unrealengine.com/u/anonymous_user_4cbce934)\
**Post date:** [October 30, 2017, 9:11am UTC](https://forums.unrealengine.com/t/help-needed-bounding-box-on-multiple-pawns/408295/1 "2017-10-30T09:11:32Z")

</div>

I’m using HUD Blueprint to render a bounding box around an object. I’m essentially following [this tutorial][1] except instead of rendering text, I’m drawing a box.

This works well for one instance of the class. But if there are multiple instances, only the box around the first one is rendered. However, sometimes, it flickers from the first instance to the others for one frame or so. The issue appears on 4.17 and 4.18

The actually rendered image (couldn’t capture the flickering, it is unpredictable) is

 ![218756-issue.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/0/200c86f0a38b056bd4af0d22c151cc03896865a5.jpeg)

I’m using an interface blueprint to create a custom event, and using that in HUD to display the bounding box (on `Event Receive Draw HUD`). The interface is called at the end of the Class blueprint `Event Tick`.

I’ve tested the `GetBoundingBox` function and it works as intended. The class BP is

 ![218760-class-bp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/d/91deb193f72b94b9341287557358360a032356b4.jpeg)

(I know the `DrawBox` is disconnected. I’m no longer using this method)

The HUD BP is

 ![218781-hud-bp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/f/91f0a7e831f6e95555c5b37ad12f5cf081fb8706.jpeg)

How can I render multiple such bounding boxes?

Update:

I refactored the code a bit so I could run a loop for all the actors of the class and the call the `DrawBox` from the HUD blueprint itself in order to cut out the message passing interface. However, this results in no bounding box being rendered despite `PrintString` working fine for the `(x,y, w,h)`.

My Blueprint (HUD BP hidden in functions as seen above):

 ![218758-hud-log-data.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/4/f8499618f851e69da164925cf581bfcbda98606b.jpeg)

 ![218759-hud-log-data-draw-bbox.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/2/002853ed059365c60e05f0dfe2a0526c0c57afdb.jpeg)

Any ideas would be appreciated. Thanks in advance

---

<div class="post-metadata">

**Author:** ![Nachtmahr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nachtmahr](https://forums.unrealengine.com/u/Nachtmahr)\
**Post date:** [November 1, 2017, 2:47am UTC](https://forums.unrealengine.com/t/help-needed-bounding-box-on-multiple-pawns/408295/2 "2017-11-01T02:47:21Z")

</div>

Screenshot of your BP would be helpfull 😜

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4cbce934](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4cbce934](https://forums.unrealengine.com/u/anonymous_user_4cbce934)\
**Post date:** [November 1, 2017, 4:59am UTC](https://forums.unrealengine.com/t/help-needed-bounding-box-on-multiple-pawns/408295/3 "2017-11-01T04:59:56Z")

</div>

Edit: I have. UE4Editor was throwing a seg fault (coz I did smthg) and I had to re-clone and rebuild it.
