Hello. I am having this problem. I have experimented with many different setups, none of them working yet.
My goal: Be in game and place cubes on a grid as in minecraft.
My problem: Getting the grid set up.
I already set up a line trace so that the block can be placed anywhere, but I want it to snap to a grid, rounded to 100s (because the blocks are 100 units wide) so is there a way to do this at least semi-simply? I have seen a few posts but couldn’t find any with a good well-explained solution. I figure modulus and/or rounding will help here?
I’m using a similar system in my project, though I’m only building blocks on a planar grid, meaning I don’t build blocks on top of eachother like in Minecraft, but I imagine one could adjust the system to work that way.
Looking at my blueprints I don’t think there’s a really simple way, but I built my system from a tutorial project I found on Youtube, you could download it and see if you can figure out how to use it for your game.