How do i spawn blocks where my cursor hovers over? In the game

How do I spawn blocks where the cursor is hovering over? I tried to spawn blocks with right-click in this game ( but the X and Y coordination doesn’t match the cursors coordination

Thats because the coordinates of the mouse is of the screen size (or UI size) and not of the Game world.
When you move the camera, the Level coordinates does not = the Screen coordinates.

Try attaching the outputs of Set X and Set Y of the camera and add that with the the mouse X and Y.

Thanks! @“JR 01” this helped a lot! But I was wondering, is there a way to place blocks in a grid? As shown in this GIF. I don’t mean the radius but placing it in a square

This may look a little complicated but its to fix it when you pass the negative coordinates in the game level so you can still place a block correctly.


@“JR 01” It looks a bit complicated yeah, I’m sorry if I couldn’t answer again, it’s because I went away from home at Christmas but I’m back. The grid placing worked amazingly thank you!