Paint mesh

Hello. I’m very new to Unreal Engine. I was painting with cubes and I saw that cubes were overlapping; the cube mesh was poking inside of other cubes. I am sure there is a way to make sure meshes do not overlap, but I don’t know how to do this. Please, can anyone tell me what I need to do. I imagine this would be really important if I was painting with mushrooms or trees, because you don’t see trees growing inside of other trees and you don’t see mushrooms growing into other mushrooms. Thank you for your feedback; I greatly appreciate it.