how to set 2 objects position together

Hello everyone,
I have a problem when I try to set the position of an object to another object.
alt question1

alt question1
what I’m trying to do is when I drag a block around the scene and when the block is nearby another block it will auto connect together.
please tell me if you have any suggestion. Thank you very much

i m assuming that the pivot of all of your objects is in center, if yes, then it is too simple … say we have two objects, object1 and object2, and we want to place object onto object1, then simply set the X and Z components of position of object2 to the components of object1, and for the Y component you had to do some calculations regarding the size of both objects, and these calculations are nothing but you just had to get the size of object1 (size Y) and half size of object (size Y / 2), and place this new calculated value into the Y component of object2 position …