- Home /
Question by
fido51 · Oct 12, 2012 at 11:38 PM ·
gameobjectinstantiate
Split a cube into several pieces?
Dear community.
Got a small problem, hopefully theres a ridiculous easy solution to it.
I have a cube that is instantiated to the sceen with its width and height set by the player. Then I want to do this, according to player selection, make the cube into smaller pieces that are equal in size according to initial width and height.
Sort of like this
Have pretty much done all the coding before, and after. But missing a good way of doing this part. These cubes are buttons and therefore its important that they are separated or clickable in each separate area.
Any good ideas or help on this would be greatly appreciated :=)
cube.jpg
(101.2 kB)
Comment
Best Answer
Answer by Eric5h5 · Oct 13, 2012 at 02:10 AM
Destroy the cube, and replace it with two cubes (scaled as appropriate).