Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » [Help] Voxel AR RTS making for Android

[Help] Voxel AR RTS making for Android

View previous topic View next topic Go down  Message [Page 1 of 1]

1 [Help] Voxel AR RTS making for Android on Wed Jul 12, 2017 6:15 am

Riscc


Member [Lv. 1]
Member [Lv. 1]
Hello fellow dev.
I'm pretty much new to game making in unity but still I have decided that I want to make a Voxel RTS forandroid but I have no idea where to start. I have started looking at a youtube.com/watch?v=x-o-kejMSMU tutorial. Is it even helpful?
I have done:
The models
Project in Unity

View user profile

2 Re: [Help] Voxel AR RTS making for Android on Wed Jul 12, 2017 8:21 am

Riscc


Member [Lv. 1]
Member [Lv. 1]
And also there is something wrong with this code: Vector3 is marked red underline
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Worldgenerator : MonoBehaviour {

   public static int width = 50;
   public static int height = 50;
   public static int depth = 50;
   public float detailScale = 25.0f;
   public int heightOffset = 100;
   public int heightScale = 20;

   public GameObject GrassPrefab;

   // Use this for initialization
   void Start () {
      int seed = (int)Network.time * 10;
      for (int z = 0; z < depth; z++) {
         for (int x = 0; x < width; x++) {
            int y = (int) (Mathf.PerlinNoise ((x + seed) / detailScale, (z + seed) / detailScale)
               Vector3 blockPos = new Vector3 (x, y, z);
               CreateBlock (y, blockPos, true);
               while (y > 0) {
                  y--;
                  blockPos = new Vector3(x, y, z);
                  CreateBlock (y, blockPos, false);
               }      }
   }
               }
               void CreateBlock(int y, Vector3 blockPos, bool create) {
      if (y > 115) {
         Instantiate (GrassPrefab, blockPos, Quaternion.identity);
      } else {
         Instantiate (GrassPrefab, blockPos, Quaternion.identity);
      }
      
   }
}

View user profile

3 Re: [Help] Voxel AR RTS making for Android on Thu Jul 13, 2017 5:32 am

Riscc


Member [Lv. 1]
Member [Lv. 1]
I cant get the world generation going :/. There are some odd issues

View user profile

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum