Hello, i’m trying to spawn a blocking volume in runtime, i’m doing this:
class ABlockingVolume * Blocker = GetWorld()->SpawnActor<class ABlockingVolume>(ABlockingVolume::StaticClass(), Location, Rotation);
How do i set the brush size properties? From what i found in the engine source code i have a:
UCubeBuilder* Builder = ConstructObject<UCubeBuilder>(UCubeBuilder::StaticClass());
But how do i tell the blocking volume to use it and set it’s size? Thank you.
Update: I’ve made some progress, i added the UnrealEd module so he recognizes the UCubeBuilder and then i do:
Blocker->BrushBuilder = CubeBuilder;
CubeBuilder->X = 200.0f;
CubeBuilder->Y = 200.0f;
CubeBuilder->Z = 200.0f;
It compiles fine, when it’s created it has the right location and on the options it has the brush type Box with 200 for X, Y and Z, but it doesnt collide. When i place a manual Blocking Volume on the game and i select it, it draws 8 points, but mine doesn’t do that. I tried using:
CubeBuilder->Build(GetWorld());
But it didn’t make a difference. What am i missing?