- Home /
Check children on a grid
Hey there! I have a little problem... I have a grid, and it works like Lego, you can move lego pieces and snap it at one place with Spacebar. But I have a little problem. Im checking if the block that im moving right now is at other blocks position move it along Z axis, so the lego pieces stack at themselves, like a tower. This works, but when I place a block next to the tower, and than when I move the next block again at the tower, it just goes inside. Something like this
I have this
ooooo // its from the side
than i make a tower of ..lets say 3 blocks, and dont mind the ball at the left,
• • • ooo•o
it works, now when i place a block next to the tower
• • • oo••o
now its spawns another block, and when i move it right again, into the tower, it dont goes on top if it, but into it like this
• • • oo•xo //x is the block that went into the tower
Source code is this.
Answer by DavidDebnar · Jul 08, 2011 at 06:08 PM
Already figured out..I made it bit else from the root, and it works perfectly.
Your answer
Follow this Question
Related Questions
Stacking Lego pieces 2 Answers
Lego-building System. 1 Answer
Orthogonal View: snapping objects to grid at runtime 1 Answer
How can I snap to hex tile centers in world x,z coords? 1 Answer
Gameobject follow mouse on center 1 Answer