Spawning instanced static meshes in a box, without overlapping

Hello Forums.

Does anyone know the proper way to spawn a lot of instanced static meshes inside a box, without the meshes overlapping each other? Every time I try this they are overlapping. I have seen a few other methods online, but none seem to work.

(The ISM component is set to World Static and Block All)

(post deleted by author)

This would be perfect for PCG. But I create a regular Blueprint for you at the link below. You’ll have to change the HSIM component and the box size.

There are 3 local variables.

  1. Boxes is an array of Box
  2. CurrentBox is type Box
  3. IsGoodBox is a Boolean. Default value doesn’t matter.

If anyone knows how to make blueprintue graphs show up in the forums, please let me know.

1 Like

This is working great, just had to untick world space and so it spawns the boxes where I place the actor. Thank you

Glad it worked!