I wanna attach an object to another like a picture, when I drag an object near another.
I searched and found some information.
ex)
obj1.transform.parent = obj2.transform;
obj1.transform.localPosition = Vector3.zero;
obj1.transform.localRotation = Quaternion.identity;
But, It makes objects overlapped.
How do I do?... can anyone help me please?
↧