Download

Having some trouble with the snap to grid node and getting what I want

So I am trying to make a game where you place blocks on a grid, I am using the snap to grid node to place the blocks where I need them. This is working for when I am using only 1 size of block, but I am attempting to make it so you can switch between 2 types of blocks (1 large and 1 small) my problem is is that I can’t seem to find any mixture of grid size that gives me the ability to get my desired outcome.
Here are some pictures to show what that desired outcome is

So lets say this is the big block and it is filling one full grid space for its size
Showing

I now switch to my smaller block and do this
Showing1

I want the block to when it is smaller be able to fit into a grid that basically allows me to recreate a larger cube with 4 smaller cubes. I have been unable to do this with the grid snapping and I don’t know if that’s just because I am dumb or its just unable to create what I want. A little help would be greatly appreciated

Are you doing this in the editor, or you have code in game?

In the editor, you can choose your own grid snap sizes in the editor prefs. In game, of course, anything goes.

I am using code in game and trying to make it so that player can place these blocks in game. So yeah in game stuff

Then the relationship is

small-cube-snap = .25 * large-cube-snap

as I’m sure you know :wink:

Can you show some code?

Will be able to in a bit, it is thanksgiving so doing stuff with family for most of the day but will try to get on eventually