Snapping 2d Shapes together

Hello,

I’m trying my hand at this, unfortunately very short, tutorial on how to snap multiple objects ‘together’.

Unfortunately I don’t really get along with the tutorial, so I was wondering if anyone has ever seen something like this in the form of a YT video?

In my search I only found videos on how to snap things in the editor.

When making a jigsaw puzzle game, it was mostly about distance checking plus rotation checking. So, each piece would know who it’s neighbors were. Then, when I dropped a piece after dragging it, I would check the distance to it’s neighbors. If one was within range, you then need to check are they rotated the same direction, thus they would connect on those sides. If so, then snap them together on the correct side.

I also had code to handle if you dropped it close to multiple pieces (ie, one that connects on the top and one on the side). It looked like that link the person was doing something very similar.