MarchingSquares

Description
This Script renders a arbitrary 2D Mesh out of a Point / Voxel Lattice. It actually computes two Meshes, one for rendering (Purple) and one simple mesh for collisions (Blue).



Related Work
Some of the Code is derived from "Polygonising a scalar field (Marching Cubes)" by Paul Bourke http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/ A lot of inspiration of how to use it with Unity by Brian R. Cowan. See some of his Work here: http://www.briancowan.net/unity/fx

Usage
Just attach the Script to an empty GameObject. Make sure you have a Camera in the Scene named in the standard way "Main Camera" (its just there for convenience - if you dont want it, just remove it from the script: lines 527ff).