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

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.

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.

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

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.

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?

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.

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?

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.

There’d be like 500k instances though.

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.