I have the following snippet of code:
using UnityEngine;
public class TestScript : MonoBehaviour
{
public float heightScale;
public float xScale;
void Start()
{
for(int x = 0; x <= 25; ++x)
{
float height = heightScale * Mathf.Floor(Mathf.PerlinNoise(xScale * x, 0));
print(height);
}
}
}
Whenever I input any values for heightScale
, and xScale
, I always get an output of 0
twenty-five times in the console. Can anyone provide an explanation as to why this is happening?