I want to perform a “snap” effect where one object snaps to the other when it is moved close.
I have points of connection for both objects. I want to move the position of object1 so that the point of connection of object1 touches that of object2 (in other words, have the same position).
The points of connection are Vector3. There are many methods for Vector3 available but I’m not sure how to calculate the “snapped” position of object1 using these methods.
Another thing I would like to do is to rotate object1 if it is in the wrong rotation to allow this snapping to happen without overlapping both objects.
I appreciate the help