SnapToGrid queries


I am making a game based on coordinate system for learning purpose of kids. In this game, the aiming guide needs to be dragged at any intersection of x and y axis to display the coordinate of that point.
I already made it but now the player needs to drag and place it at very minute coordinate position at the intersection otherwise the text bubble coordinate is not appearing.

Please help me for this particular thing how to apply snap to grid. I saw the snap to grid project already available on GDevelop but that’s for inside the cell , but here at the intersection I need. How can I do it ??

Imagine that the intersections are the center of the grid cells, and apply the mechanics of the snap to grid project. :slight_smile:
Same grid size, but offset on X and Y by half cell.
I guess it should work.

I would create a hidden object called SnapPoint at each intersection.
Then if Cursor.DistanceTo(SnapPoint) < Cursor.Width() => Move Cursor to SnapPoint.