- Home /
How to make walls connect together automatically?
want to make walls change mesh automatically to connect together, similar to how kingdoms and castles does it?
I would guess the blocks are in a grid pattern? if so you would want to keep track of your blocks in a 2d array for many reasons. this makes things easy and organized and you can use simple coordinates in your code when looking for things. to change the shape or position you would scan the surrounding x and y positions and face your new block accordingly. setting up your game this way also would allow other standard algo's to detect things like how large your user built his castle or if all the castle walls are closed or pathfinding
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How do i Achieve mesh Extrusion? 2 Answers
Can I make a collider ignore only one other collider? 0 Answers
knockback 3d c# 1 Answer