Closed PTTG-ACTUAL closed 3 years ago
See "Disadvantages of the perlin noise" in the following page.
http://www.angelcode.com/dev/perlin/perlin.html
Another disadvantage that might not be obvious is that the noise function always returns 0 at integer values.
Random.Range(0,10000)
returns an int
value. You should use Random.Range(.0f,10000.0f)
instead.
I'm closing this issue now. Please feel free to reopen it for further problems.
To reproduce:
In a new unity project, create a simple scrip using the Perlin library. Do something like Debug.Log(Noise(Random.Range(0,10000), Random.Range(0,10000), Random.Range(0,10000)));.
Run the code. Watch thousands of 0 comments pile up.
This is in 2020.1. There are no error messages.