Hey I was just trying to remember this astonishingly simple yet mind-bendy formula i once saw for making lets say a cursor follow your mouse but snap to the closest cell of a grid.
It was something like always set X of cursor to Xmouse /32 * 32 . I know that doesn't make sense as it would just be set to the xmouse, but I know it looked almost like that I just can't for the life of me remember the principle behind it. It was essentially rounding the mouse position to the nearest cell but I just cant remember and it's driving me nuts.
Thanks a million ahead of time if you know what i'm trying to say!