- Home /
Minecraft like building system
So I have a plane made out of 20 x 20 blocks of cubes. How can I make my player able to destroy the block of cube and then could place it back there?
Felipe
Thats two main questions: "How can I make my player able to destroy the block" and "How can I make my player able to place it back". The first is a lot simpler, just add a script to each cube which checks for collision with the players axe etc and if detected then destroy the object using Destroy(gameObject);
yup that could be one very simple solution.
for the other that would be alot more complicated. maybe placing invisible grids where u can place more cubes.
or making the verysame cubes add more grid for example if u place a cube u can place more around the same cube.
thats one idea i leave the code to you hope i helped a little
Your answer
![](https://koobas.hobune.stream/wayback/20220613074706im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Building Block Prefabs 0 Answers
How remove block mesh gap 1 Answer
Optimizing multiple objects by combining meshes 0 Answers
Blocky terrain optimization 1 Answer