Add static mesh instance to specific scene

Hi,

I’m trying to generate a function to make a wall. The idea is that i will give number of segments, world location and direction. The wall is then built with pillars and wall sections.

My function builds the wall at 0,0,0, in the +ve X direction (using many ‘Add Instance’ on static meshes) then moves it to the location to the one given in when it’s called and rotates it (using Set Relative Rotation and Direction).

I intended to call this function many times, but every time i do, all walls (the current and previous one) are rotated and positioned to the last rotation and position.

It seems that every time i add instance in my blueprint, it adds to the default scene and when i rotate, i’m doing this to the whole scene.

So, I’ve been trying to create a new scene within the blueprint every time i call the function. Set default scene to point at that, then add the instances, then set the rotation and position of the default.

This isnt working. Does this sound like a mad technique - if so, can anyone offer a different way of doing it ?

( i want to build in location 0,0,0 and then rotate the whole wall, because i’m trying to avoid the trig/maths of positioning every single wall element)

This has been done and is available in the content examples project from Epic. It is the fence inside the Blueprints Advanced level. Just replace the mesh and off you go!

Hope it helps.