Transform Choose(Vector3 pos) { // If we don't need to choose, don't. ez. if (objects.Length == 1) { return(objects[0]); } float val = noise.FBM3(pos.x, pos.y, pos.z, 0, .99999f); return(objects[(int)(val * objects.Length)]); }
Transform Choose(Vector3 pos) { // If we don't need to choose, don't. ez. if (objects.Length == 1) { return(objects[0]); } float val = noise.FBM3(pos.x, pos.y, pos.z, 0, .99999f); return(objects[(int)(val * objects.Length)]); }