- Home /
how can I make a box with flat cubes(which I want to call a 'tile')? and have each tile detect collision?
hi I am new to Unity. I want to make an empty box made with tiles. box 1, box2, box 3 will be my custom gameobject.
box 1 is made with 6 tiles, box 2 is made with 2 by 2 tiles on one side, which makes the box consist of 24tiles. box 3 will be consisted of (3*3)*6 tiles.
it's not like making voxel cube. I want to make an empty box.
inside my box, I create a sphere and make it bounce inside the box. when the sphere collides with the tile, I want to get 'true'.
I can't make boxes with 54 tiles with my hand, so I want to use script. but I don't know how to make it.
I tried making one side of box first, using 2d array, but how can I make the other 5 sides and make each tile carry boolean data for the later collision?
Im not sure if I made my question understandable. please help.