Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Hexagonal grid traversal

$
0
0

Looking for an algorithm similar to fast voxel traversal, but for 2D hexagonal grids. I'd like to return the list of pairs of integer hex coords and gridline intersections whose hex-cells are intersected by a ray or line segment.

I can find just 1(!) example online of this on shadertoy here: https://www.shadertoy.com/view/XdSyzK​ which I have tried to implement but in vain. The hex to cartesian conversion used is not the same as on https://www.redblobgames.com/grids/hexagons/​​​​​​which is an approach I understand thoroughly and have based all hex stuff on. Any …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>