# Get actor bounds incorrect if I setup the actor in event graph instead of construction script

**URL:** <https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534>\
**Category:** Blueprint\
**Tags:** event-graph, unreal-engine, construction-script, bug-report, Blueprint, question\
**Created:** [October 25, 2019, 6:35pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534 "2019-10-25T18:35:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [October 25, 2019, 6:35pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/1 "2019-10-25T18:35:54Z")

</div>

Hey all. I have a simple grid actor I use to generate the floor(For loop x for loop), I use a get actor bounds node to spawn the details in a bounding box. If I setup my grid generation in construction script it will work fine.

But when I move the grid generation into the event graph with everything else it will no longer work correctly and the bounds are always 50,0,50. Which is just straight up impossible as the bounds of just one hism instance is 1000,1000,100.

I’m really not sure what the problem is here and it’s super annoying as I’m attempting to optimize my grid generation and the only reason it was setup in construction script was so I could see what it looks like as I edit it easier. I’m not even sure what details I need to give as this is such a weird issue. If I move my for loops to construction script my get actor bounds in event graph works, if I then move it to event graph, 50, 0, 50.

And I’m getting actor bounds dead last well after everything is generated.

Any help appreciated thanks.

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 25, 2019, 8:46pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/2 "2019-10-25T20:46:07Z")

</div>

You get the bounding box for each HISM instance separately, right?

EDIT: Do note: You can’t get bounds for HISM instances separately. You can only get the bounds of an entire actor or it’s components.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [October 25, 2019, 8:48pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/3 "2019-10-25T20:48:05Z")

</div>

Doesn’t get actor bounds already do that for you? It works perfect if its construction script but not event graph.

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 25, 2019, 9:17pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/4 "2019-10-25T21:17:56Z")

</div>

Tested a bit, actor bounds don’t seem to update after BeginPlay. So you would either have to set the bounds as a variable, maybe spawn a single mesh at BeginPlay once, get it’s bounding box, and save it for future use.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [October 25, 2019, 9:27pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/5 "2019-10-25T21:27:20Z")

</div>

Hmm the problem is the actors’s size is set by the player before hand, I don’t know what the size will be. Any workarounds? This has to be a bug right?

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 25, 2019, 9:42pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/6 "2019-10-25T21:42:16Z")

</div>

If the player sets the size, save the player input as a variable. I mean, you have to know the player specifications when spawning the instances, so I presume you have that somewhere already. This does indeed seem like a bug. It also seems like this isn’t the first time actor bounds are buggy.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [October 25, 2019, 9:49pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/7 "2019-10-25T21:49:44Z")

</div>

I can use the math to figure out the bounds but I need to get the origin as well…

Probably tile x tile x = bounds, /2 for middle point?

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 25, 2019, 9:56pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/8 "2019-10-25T21:56:59Z")

</div>

GetInstanceTransform should give you the location of each instance. You will just need the instance index. It also has a bool input for world space.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [October 25, 2019, 11:08pm UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/9 "2019-10-25T23:08:24Z")

</div>

There’d be like 500k instances though.

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 26, 2019, 1:57am UTC](https://forums.unrealengine.com/t/get-actor-bounds-incorrect-if-i-setup-the-actor-in-event-graph-instead-of-construction-script/457534/10 "2019-10-26T01:57:58Z")

</div>

Is that a problem? You can get the mesh-index from collision/trace results. You might have to turn on “Multi Body Overlap” on the HISM, depending on how you do things. So nothing should have to be stored except for the scale of your bounding boxes, which will stay the same with each tile, I presume.
