How can I implement a similar object management system in the maze?

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

It is similar to drag and drop, but how do I make it only move in a given direction?