Quantcast
Channel: Questions in topic: "scanner"
Viewing all articles
Browse latest Browse all 14

Level Scanner

$
0
0
Hi guys, I'm trying to build a level scanner that can detect collisions and create a grid avoiding that collision. I can easily build the grid but the script doesn't remove the nodes "blocked" by something. All I get from Debug is Scanner is true(0.0, 0.0, 0.0). . . Here is the code: public static void BuildGrid(Vector3 position, int numX, int numY, int spacing) { List nodes = new List(); int count = numX * numY; for (int i=0; i 0) node.BiDiConnect(nodes[i-1]); if(y > 0) node.BiDiConnect(nodes[i- numX]); if(x >0 && y >0) node.BiDiConnect(nodes[i-numX-1]); if(x < numX -1 && y >0) node.BiDiConnect(nodes[i-numX+1]); if(scanner) { node.Delete(); Debug.Log("Scanner is true" + node.Position) } } }

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>