17 lines
526 B
C#
17 lines
526 B
C#
using UnityEngine;
|
|
|
|
public class HexMetrics
|
|
{
|
|
public const float outerRadius = 10f;
|
|
public const float innerRadius = outerRadius * 0.866025404f;
|
|
|
|
public static Vector3[] corners =
|
|
{
|
|
new Vector3(0f, 0f, outerRadius),
|
|
new Vector3(innerRadius, 0f, 0.5f * outerRadius),
|
|
new Vector3(innerRadius, 0f, -0.5f * outerRadius),
|
|
new Vector3(0f, 0f, -outerRadius),
|
|
new Vector3(-innerRadius, 0f, -0.5f * outerRadius),
|
|
new Vector3(-innerRadius, 0f, 0.5f * outerRadius)
|
|
};
|
|
} |