I'm relatively new to Blender 3D so I'm not acutely aware of any limitations that may persist.
I was wondering how one could initiate snapping of objects together with the presence of another object. So for example, another object A comes along and picks up multiple object B and creates a organised chain of object B.
Thanks for your time!
Edit:
I'm hoping to create a simulation. Long story short, I'm creating a genetic algorithm integrated into blender, but that information for this question is irrelevant. In terms of what objects they are, a rigid body object A picking up another rigid body object B, like a magnet. Object A then collects more rigid object B and snaps them together in a chain, with the objects adjacently organized.
Here is a quick sketch of what I mean:


