Using a blocking volume to instance meshes

I want to make an editor tool that will make my world creation process a whole lot easier. I drew a picture:

Right now I have a blueprint that does something similar to that image: I input x and y values and the meshes are instanced to fit the dimensions. I want to use a blocking volume to get those values instead of manually writing them in, so that I can drag and resize it in the editor using the brush editing tools.

I’m fairly new to blueprint and haven’t done any editor scripting at all. I’d appreciate any tips on how to get something like this up and running!

You can make a blueprint that does this in the construction script.

Putting the corners ( and corner tops ) in is easy, but you’ll ( probably ) need to add sides as the volume increases past certain thresholds.

In other words, dragging the edge of the volume will have no effect until you reach a threshold, then another side piece is added. Unless you want to just stretch the side pieces ad infinitum.

Ok, this is as far as I go :wink:

I will attach the BP as text ( you can open it, select all, copy and paste into a construction script )

As you can see, the BP fits as many side walls as it can, and scales the height to match the box:

prototype

prototype.txt (242.8 KB)

1 Like

Cool, that looks better than what I got so far:

volume2

I have used a blocking volume to define the bounds of the mesh, and then filled it with meshes to make my “ledge”. It does what I want but it’s clunky to use because editing the volume doesn’t trigger the meshes to re-organize themselves, I have to drag the object after each edit.

From the look of your gif it has a collision mesh being updated as you drag, is that a volume or just a box collider? I’m checking out your files now…

Well I certainly learned a lot from looking at your blueprint! I also stumbled across being able to double click a static mesh component in a blueprint and being able to move it individually - that was the missing link for getting the bounds size as I drag, I think.

One thing looking at your blueprint, I can see that you are using the ‘extent’ variable to set the locations of the corner meshes, but there is nowhere that variable is being set? Do I have the whole picture?

Thanks for the info! Back to the drawing board…

You’re right, I never actually look at the extent of the box, I just set it. The actual extent is just stored in the variable.

The variable is the ONLY thing being set :slight_smile:

It has a ‘widget’ thing to move it:

image