Question by
Frimgehnier · Apr 02, 2018 at 07:22 PM ·
mathfperlin noise
Yet another "Mathf.PerlinNoise() returning the same value" problem
The solution that I see on these answers all the time is that you need to use fractions instead integers, but it seems not to help in my case.
With this code
float noiseResolution = 100f;
for (int i = 0; i < range1; i++) {
for (int j = 0; j < range2; j++) {
n = Mathf.PerlinNoise (
(float)i / range1 / noiseResolution,
(float)J / range2 / noiseResolution
)
}
}
arguments are clearly fractions, and yet the result is somewhat the same. What I'm doing wrong?
Comment
Oh. n is float and I use it to modify settings in grid with dimensions range1 x range2.
But this is not the point. The n itself gets almost the same value through the cycles above.
Your answer
Follow this Question
Related Questions
Lerp between two int vaules smoothly 4 Answers
Voxel terrain generation? 0 Answers
mathf.round problem 2 Answers
how to make mathf.pingpong not from 0 3 Answers