{"id":1654,"date":"2022-07-25T19:05:12","date_gmt":"2022-07-25T19:05:12","guid":{"rendered":"https:\/\/golemitegames.com\/?post_type=docs&#038;p=1654"},"modified":"2022-07-27T16:27:04","modified_gmt":"2022-07-27T16:27:04","password":"","slug":"setup-auto-cell-blocking-2","status":"publish","type":"docs","link":"https:\/\/golemitegames.com\/index.php\/docs\/setup-auto-cell-blocking-2\/","title":{"rendered":"Setup auto cell blocking"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" style=\"font-size:22px\">Basics<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Naming and setup for layers<\/h2>\n\n\n\n<p>Set up a new layer and call it ground or something similar. Assign this layer to your physical ground object, making sure it has a collider or mesh collider on it. A mesh collider will work best for single objects that have dips or cliffs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Adding and placing the grid<\/h2>\n\n\n\n<p>Create a grid and sort out the rest of the settings, making sure that the grid type is set to either single cell, chequered, points or lines.<\/p>\n\n\n\n<p>Normally the grid will hover slightly above the terrain in many instances, so move the grid slightly above. Something like 0.015 above your ground object or however much above the ground is desirable for your game.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Auto cell block type and ground layer<\/h2>\n\n\n\n<p>Turn on Auto Cell Block and set the type to block both. Set the ground layer to the layer your ground object is in that you set up earlier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting up Automatically<\/h2>\n\n\n\n<p>Grid Builder 2 comes built with a preview system for viewing how your grid will block cells. Click on the grid, under <strong> Auto Cell Block<\/strong>, hit <strong>Create<\/strong>, and then you will see either red or green squares. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"899\" height=\"450\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-4.png\" alt=\"\" class=\"wp-image-1658\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-4.png 899w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-4-300x150.png 300w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-4-768x384.png 768w\" sizes=\"(max-width: 899px) 100vw, 899px\" \/><\/figure>\n\n\n\n<p>If you hit <strong>Auto Update<\/strong> and then try to change some of the parameters, you will notice which squares are changing there available status. The main fields to change are <strong>Blocktype<\/strong>, <strong>Ground Distance<\/strong> and <strong>Above Check Box Size<\/strong>. You can also preview all of these underneath these settings. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"902\" height=\"453\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-5.png\" alt=\"\" class=\"wp-image-1659\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-5.png 902w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-5-300x151.png 300w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/07\/image-5-768x386.png 768w\" sizes=\"(max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<p>When you are happy with which cells will be free and created, remove the preview by hitting the <strong>Remove<\/strong> button. The cells you see here, are exactly which ceclls will be created at runtime. <\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting up manually <\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting the ground distance value<\/h2>\n\n\n\n<p>Turn on Show Below Rays to see the Ground Distance value. You may need to zoom in a little to see them.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1024x475.png\" alt=\"\" class=\"wp-image-1226\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1024x475.png 1024w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-300x139.png 300w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-768x356.png 768w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image.png 1147w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Zoomed in close so the ray line is inside your ground geometry<\/figcaption><\/figure>\n\n\n\n<p>You can see in the picture where the ray hits the ground object and is going through it. This ray should only just be penetrating or going through the ground, so adjust the Ground Distance value to replicate this. If all four corners of a cell touch the ground, a cell will be created, otherwise, it will be blocked.<\/p>\n\n\n\n<p>If you&#8217;re having trouble with this, turn on Check Ground Hits to see your most common distance from the grid to your ground. The most repeated debug.log will most likely be how far your grid is from the ground. A value slightly larger than this in Ground Distance will do the trick. If you have no Debug.Logs increase your Ground Distance value further.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1.png\" alt=\"\" class=\"wp-image-1230\" width=\"610\" height=\"330\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1.png 924w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1-300x163.png 300w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-1-768x416.png 768w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><figcaption>We can see here there is one corner of a cell overhanging and not touching anything, thus a cell is NOT created.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting the checkbox size<\/h2>\n\n\n\n<p>You can also play around with the Check Box Size and Height creating different spaces around objects like the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"392\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-2.png\" alt=\"\" class=\"wp-image-1233\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-2.png 875w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-2-300x134.png 300w, https:\/\/golemitegames.com\/wp-content\/uploads\/2022\/03\/image-2-768x344.png 768w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Final notes<\/h2>\n\n\n\n<p>This takes a little getting used to but it really is quite easy after the first time or two. Take a look at the demo scenes particularly scene 1 and 2 to see how they have been set up.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basics Naming and setup for layers Set up a new layer and call it ground or something similar. Assign this layer to your physical ground object, making sure it has a collider or mesh collider on it. A mesh collider will work best for single objects that have dips or cliffs. Adding and placing the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"doc_category":[32],"doc_tag":[],"class_list":["post-1654","docs","type-docs","status-publish","hentry","doc_category-gridbuilder2"],"acf":[],"aioseo_notices":[],"year_month":"2026-04","word_count":527,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"rickitz5h","author_nicename":"rickitz5h","author_url":"https:\/\/golemitegames.com\/index.php\/author\/rickitz5h\/"},"doc_category_info":[{"term_name":"Grid Builder 2","term_url":"https:\/\/golemitegames.com\/index.php\/docs-category\/gridbuilder2\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/comments?post=1654"}],"version-history":[{"count":6,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1654\/revisions"}],"predecessor-version":[{"id":1722,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1654\/revisions\/1722"}],"wp:attachment":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/media?parent=1654"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_category?post=1654"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=1654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}