I am currently developing in the Unreal Editor with Python. The big goal of my project is placing human actors on top of other actors in my world, like a human on a baseball field, a tribune, a bench, … automatically. I am using complete projects/environments, not build be me.
My first approach was to create a list of all possible “undergrounds” for my humans, so benches, tribunes, … and get the origin and bounding boxes of these undergrounds. Based on the boxes, I can get the expansion of the underground in x, y and z. Initially, I thought I could just choose a random point for x and y and use the heighest point of z.
My first tests were with cubes, so this obviously worked. If the objects aren’t cubes, well, it’s not working anymore and my humans are just hanging in the air.
Second idea, I get the geometry of my undergrounds. I was hoping to find something like “Oh, this is my underground/actor x, I get the mesh (component) and based on that, I get the geometry so I can enter my x and y and get the height/z (or z bounds) of this object on this point specified by my point in x and y”. Unfortunetaly, I didn’t find such a way. Maybe it’s hard to find for me, maybe it doesn’t even exists (but if it exists, I would be happy if someone tells me about it).
So that’s basically my problem. I’m new to Unreal Editor coding, so please don’t hesitate to tell me about an easier solution I didn’t see or correct me if I try to do some weird and complicated stuff. Thanks for your help!