[3.1] How to snap KinematicBody2D to another KinematicBody2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DodoIta

I have a moving KinematicBody2D, say A, and I want to snap another KinematicBody2D, say B, to the first one, as if A were a moving platform.
Initially A and B are moving using move_and_slide. If they collide, I want B to stop and snap to A, which will keep moving itself and B.
I’m finding this difficult to do with a Kinematic character, can I do that using move_and_slide or move_and_slide_with_snap? Or is there another way?