I’m having a problem retrieving the bounds of a given Actor before spawning it. My current issue is I am spawning Pawn’s within a given radius and the ground is not guaranteed to be even. Due to this, some get spawned in the ground and I’m working on a solution to make them appear above it and not end up getting stuck.
In order to do this, I’m doing a multi-trace of points within the area that the Pawn will spawn and picking the one with the highest height. However, to drive the box extent of the trace, I want the bounds of the Actor before spawning.
When attempting to pull this from GetDefaultObject(), any attempt to get the bounds on either Actor or Component level returns 0, this would be extremely helpful if this could be available but if not, how would I get the bounds effectively before spawning a given Actor?
The actor has to have been spawned and exist in order for its bounds to exist. A possible suggestion for what you’re trying to do would be to have a dummy actor hidden/offscreen that you can get the bounds of and then use that for your trace before spawning the real actor.
Gotcha, I was thinking about that as an alternative. Let me ask, do you think its possible something could be added to the engine to pre-calculate this based off of the structure of the Actor or at least for in this case, a Skeletal Mesh?
It may not be able to query that ahead of time since it needs all the mesh data loaded into memory to determine a bounds but I was curious. Thanks !