I have a question about mouse movement

Is there a way to make it so a sprite follows the mouse, like a curser, but it follows it by the nearest grid box, so it follows it by the grid instead of by pixels. Every time I attempt it, it just does despawns from the world, not sure why. If someone has the slightest idea or an example then I’m all ears (technically all eyes since its a computer screen, but same thing)

There is an example grazer made. I’ll send the link in a second

1 Like

I managed to create it on my own, but this example helped me simplify it down
(https://flowlab.io/game/play/1513028)

Keep in mind that this is grazer’s work and not actually mine

Ok, thank you @Caden9, thats exactly what I needed. I didn’t even know there was an example for this or else I would have check.

Also thank you @grazer for this.