Runtime Mesh Component

This is indeed intended behavior. If the box is not valid, it can’t be used for culling and such so it will bail when it sees an invalid box. In editor it should log an error message, in a packaged game it will outright crash you. Those are picked up by the validation logic which can be found at the top of RuntimeMeshComponent.h

As for creating the box, there’s a couple ways to do it. First is like you just showed…


FBox Bounds = FBox(FVector(Start.X, Start.Y, 0.0f), FVector(End.X, End.Y, Z));

The next would be like you did originally with 1 addition.


FBox Bounds;
Bounds.Min.Set(Start.X, Start.Y, 0.0f);
Bounds..Set(End.X, End.Y, Z);
Bounds.IsValid = true;

The third way is useful when you just need to sum up the points and don’t know directly which is to do something along the lines of…


FBox Bounds(0);
Bounds += Point;

where ‘Point’ is a FVector point that the box needs to adjust to fit.

I hope that helped!