Make cursor follow the mouse but snap to grid

Screenshot 2024-08-29 at 7.49.32 AM

So Im making this game for a game jam thats coming up soon. and in the game I need there to be a cursor that follows the mouse but i want the cursor to move in 16 pixels at a time so it always aligns with the grid.

also i have some other questions

Well if the game jam is coming up soon I don’t think you can make the game but i will help when I have time


Here you go this should work

what extension is this

The rectangle grid extension it does not go on an object