I know it’s sounds very easy but it isn’t!!!
Hi there, I’m making a drag and drop puzzle and I need some light on how to do this: I did a drag and drop mechanics follwiong this tutorial Blueprint Actor Setup | Unreal Engine Documentation
and now I have a movable box, I need some way to snap this box to Z when I dragging it and it finds another box on the way. I know it’s pretty easy but I’m not having the right idea. any help please? I tried make this work on 2 ways, the first, I get the Z of the mouse hit location, but then the box keeps updating the z value and keeps coming closer to the pawn/ camera

the second, I get the Z from where the player controler is pointing
then, the box keeps floating intead of being snaped to the ground, and the second box doesn’t get on top of the first one

I tried some math formulas using the 2 Z values, but the results I get is the same result of the first image (the box keeps updating the Z value), or then, I can get a box on top of another, but with space between them.
I tried doing this suggestion “Try doing a line trace from your box down on the Z axis. Break the Hit Result and get the hit location, then set the boxes location to the hit location. You’ll have to play around with the numbers to get an exact result but this should work for what you are trying to do.”, I followed some tutorials as found in here:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html But I can’t get this thing working
Please help, I’m 2 weeks trying to get this thing done now. Please help, show some BP examples if possible, thanks

