From 19ab5d857b045ca145bca6791d966a017194c971 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 6 May 2020 02:21:08 -0500 Subject: [PATCH] remove incorrect "diameter" math --- procedural-placement/Assets/PointGeneration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/procedural-placement/Assets/PointGeneration.cs b/procedural-placement/Assets/PointGeneration.cs index 1519ffd..3ab1559 100644 --- a/procedural-placement/Assets/PointGeneration.cs +++ b/procedural-placement/Assets/PointGeneration.cs @@ -107,7 +107,7 @@ public static class PointGeneration { // Vector2 dir = new Vector2(Mathf.Sin(angle), Mathf.Cos(angle)); // Vector2 candidate = spawnCenter + dir * Random.Range(radius, radius * 2); float theta = 2 * Mathf.PI * (seed + i / attempts); - float r = (radius * 2) + epsilon; + float r = radius + epsilon; Vector2 dir = new Vector2(Mathf.Sin(theta), Mathf.Cos(theta)); Vector2 candidate = spawnCenter + r * dir; // Vector2 candidate = new Vector2(