UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


description[Help] Voxel AR RTS making for Android Empty[Help] Voxel AR RTS making for Android

more_horiz
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

description[Help] Voxel AR RTS making for Android EmptyRe: [Help] Voxel AR RTS making for Android

more_horiz
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);
      }
      
   }
}

description[Help] Voxel AR RTS making for Android EmptyRe: [Help] Voxel AR RTS making for Android

more_horiz
I cant get the world generation going :/. There are some odd issues

description[Help] Voxel AR RTS making for Android EmptyRe: [Help] Voxel AR RTS making for Android

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply