Hello everyone, thanks in advance for your replies.
I’ll explain a bit of background regarding what I am doing so if there are possible alternatives then I can look into that.
Currently me and my team are working on a project in which we are trying to import a map of a city into unreal engine 5. The map in itself is a static mesh. Low poly with roads. houses, etc… however, we want to replace the houses that are already in place with a procedural building tool, that I created to randomize and make it more detailed as in itself, it will be very time consuming to individually place the buildings.
I had thought of two solutions, one was to make a texture inside of the 3D software where all the white parts would represent building locations and and use Rama’s Victory plugin to get the color for the pixels and compute locations for placing the generated buildings. However, the plugin is not available for Unreal Engine 5.
The second option which I’m going for is to raise the height of the boxes in the 3D software and then in Unreal Engine use a Multibox trace to locate all the hit traces for the meshes that are above a certain height, store those locations and then place the buildings in that place.
Now the problem:
By using a multibox trace the location comes for the origin (pivot) of the terrain not the hit location of the individual raised faces of the mesh. I understand that as they are one mesh it will always point to the origin, however importing the low-poly buildings individually means either importing with an offset pivot point from the origin or again manually placing them which is what I’m trying to not do.
Also, this is being done in the construction script of a blueprint as a utility tool and will called in a public function, not called for construction script update.