Extending BoxVolume Extents based on Child Actors?

There is a node Get Actor Array Bounds which, once fed an array of actors, returns a cumulative result of their bounds:

These two actors are attached:

Image from Gyazo

1 Like

Hi all,

I have a Blueprint Actor which has a BoxCollision component attached. At runtime, the Blueprint spawns a series of other Blueprint Actors, all of which have their own, smaller, BoxCollision volumes, and attaches them to itself.

I would like to resize the extents of the BoxCollision volume on the parent to encompass all of the child actors.

I’ve done this previously using Unity, there was a bounds.encapsulte method you could use, an example of it being applied is here:

and from the documentation;

Is there anything similar to this within UE4?

Thanks in advance for your help :slight_smile:

Hi,

Thanks so much for such a prompt and helpful response, that’s really useful, and got me out of a jam! :slight_smile:

Quick question regarding the “centre”.

When I set only the box extents, they are going from the 0,0,0 point, so half of my box volume both vertically and horizontally is now “over” or “containing” the other actors. The centre property looks like the thing I want to be using but I’m guessing I will need to shift the position of my BoxVolume in order to do that, like this (this works but I’m not sure if its the best way);

Sounds about right. You can always visualise it just to make sure things behave correctly:

Thanks for your help, really appreciated.

It was the use of that SetWorldLocation node I wasn’t sure about, seems to be working though. :slight_smile: