Make an object attach to Static Mesh In-Game

I’m using a fixed camera at the moment, so when I hit play, It spawns my object ( weapon cube) at my mouse location at a fixed distance. What I want to achieve is to make my spawned weapon cube attach and drag along a static mesh while hovering my mouse over it. I have two static meshes at different locations, so when I hover over the mesh, I want to weapon to snap on the surface of the static mesh. I realize that I need to use Line trace, but have no Idea how to make it work, and it is sort of difficult for me to understand the logic between finding the hit location and moving my weapon cube at that same hit location while it moves along the surface of the static mesh.

Here is an example of my In-Game view. The cube in the air is controlled by my mouse, and I want to snap it to the meshes on the ground when my mouse hover over it.

Here is my fixed character calling to spawn my weapon cube.

And here is my Weapon Blueprint.

I want my weapon to have a fixed position, but If it hits the static mesh, I want the weapon cube to move to that position.
Any help will be greatly appreciated!