This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://gist.github.com/inca/0b3d194b755e2efd9d7d8e3665e6cfbb | |
// math from https://www.redblobgames.com/grids/hexagons/ | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
public static class HexVectorExtensions { | |
public static Vector2 WorldToPlanar(this Vector3 world) { |