[20/50] Spawn objects attached to the ground in Unreal

To spawn objects at the ground level, we run a line trace from our starting location in the negative Z direction and check for collision.
In our case, we wanted to check for the ground relative to our player character so we use a skeletal mesh socket as a trace start point and trace Z-downwards for 100 uu (1uu = 1cm as of Unreal Engine 5.1).

We filter out to check the collisions only for objects for World Static types (suitable for all most all cases). If a hit is detected we assume it as the floor. But this is also because we are familiar with the terrain our player will operate on in our specific case.
This assumption might fail if, for example, the players is standing upon a box or some other object placed on the ground and the line trace hit detects and returns that object instead of the ground.
In such a scenario, we can, among other things, trace a forward (diagonal) line to check the Z-downward collision a little further ahead from the current trace start point. This can be done in combination with a check for the specific type of actor or component returned by the Break Hit Result node to see if the colliding node is a floor object in the scene or not.