public void CreateNewLandscape() { //transform.position = new Vector3(0f,0f,0f); pointGapWidth = (startX2 - startX) / (float)(pointCount - 1); rageSpline.ClearPoints(); for (int i = 0; i < pointCount; i++) { float x = startX + (float)i * pointGapWidth; curSteepness = steepness + x * 0.00001f; rageSpline.AddPointWorldSpace(i, GetNewLandscapePoint(x), transform.right * pointGapWidth * 0.33f); } rageSpline.SetPoint(0, new Vector3(rageSpline.GetPosition(0).x, 0f, 0f)); rageSpline.SetPoint(1, new Vector3(rageSpline.GetPosition(1).x, 0f, 0f)); rageSpline.RefreshMesh(); }