How get HitResult on Ovelap

Hello

I’m building a tower of blocks. User drags a block and put on other. And I enable physics only after finish dragging. While dragging blocks can’t goes through others and don’t have physics(can’t crash the tower while dragging).
I need to detect that one block overlap other. And set position of dragging block upon static. Static blocks have different rotation, so I cant calculate Z based on bounds and location.

I try to:

FHitResult HitResult;
if (DraggingBlock->SetActorLocation(NewLocation, true, &HitResult) == false)

Also I saw Component Overlap hit position always returns 0,0,0 - Programming & Scripting - Epic Developer Community Forums

But all it return nothing.

How I need to setup collisions or use some other functions to get HitResult like I get OnComponentHit event?

Thanks

I find answer :slight_smile:

I use

SetActorLocation(NewLocation, true);

and get FHitResult on OnDraggingBlockBeginOverlap