Minecraft like block building?

Hey guys, I saw this with UDK but is it possible with UE4 too (im sure its possible with UE4, but how [and hopefully with blueprints])? Simple thaught: I click with my right mouse button and it will build / spawn a cube in front of me. So I can even break this down again by pressing the left mouse button while looking at the cube. So the spawn system is not that hard but my points where I can’t move further on is 1. the grid (no overlapping cubes!) and 2. break down (maybe line trace)? Please help!