Download

How can I get the bounds of a volume at Runtime?

I’m trying to get the bound extents of a volume in the level, the following method works in editor, but NOT in standalone (it just returns zero).



	/* Update Local Transform (Conditionally is safer). Ensures the Quadtree will be placed in the right location. */
	GetBrushComponent()->ConditionalUpdateComponentToWorld();
        FBoxSphereBounds BoundsArea = GetBrushComponent()->CalcBounds(GetBrushComponent()->GetComponentTransform());


I’ve tried to use GetActorBounds(), but that also returns nothing. Any ideas on this one?

Okay turns out that it does work, the problem is that the actor obviously hasn’t been initialized before UGameInstance::Init, so I have to call it sometime after that which is a pain.

It has to be done from the GameInstance. Wheres the earliest place I can start calling functions on Actors in the world? Can’t do this in a gamemode either :confused: