Ejemplo n.º 1
0
        void Start()
        {
            moonOrbitPoint = transform.parent.gameObject;

            TerrainVolume volume = GetComponent <TerrainVolume>();

            int               moonRadius   = 15;
            Region            volumeBounds = new Region(-moonRadius, -moonRadius, -moonRadius, moonRadius, moonRadius, moonRadius);
            TerrainVolumeData result       = VolumeData.CreateEmptyVolumeData <TerrainVolumeData>(volumeBounds);

            TerrainVolumeGenerator.GeneratePlanet(result, moonRadius, moonRadius - 1, 0, 0);

            volume.data = result;
        }
Ejemplo n.º 2
0
        void Start()
        {
            earthOrbitPoint = transform.parent.gameObject;

            TerrainVolume volume = GetComponent <TerrainVolume>();

            int               earthRadius  = 60;
            Region            volumeBounds = new Region(-earthRadius, -earthRadius, -earthRadius, earthRadius, earthRadius, earthRadius);
            TerrainVolumeData result       = VolumeData.CreateEmptyVolumeData <TerrainVolumeData>(volumeBounds);

            // The numbers below control the thinkness of the various layers.
            TerrainVolumeGenerator.GeneratePlanet(result, earthRadius, earthRadius - 1, earthRadius - 10, earthRadius - 35);

            volume.data = result;
        }