使用时注意的几点:
1. 乘以unkownCoef之后(如我默认是0.05f,就把 j = 1,2,3变成 j = 0.05,0.10, 0.15...) 这样perlin()的 j 参数之间差别的就不大,k参数同理,这样就比较丝滑)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BerlinNoiseTest : MonoBehaviour
{
public GameObject obj;
List<GameObject> cubes = new List<GameObject>();
// Start is called before the first frame update
void Start()
{
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
GameObject o = Instantiate(obj);