Hexagonal Line Drawing & Line of Sight (LOS) Raycaster
Creative & DesignDesignUnderstanding Your Results
Calculates the hex distance between origin `(q1, r1)` and target `(q2, r2)`, executes cube linear interpolation with deterministic tie-breaking nudges, generates the complete step-by-step tile list, and provides copy-ready TypeScript functions.
Practical Guidance & Next Steps
Using cube coordinates $(x, y, z)$ with linear interpolation ($ ext{lerp}$) and cube rounding is the mathematically purest way to draw straight lines on hex grids.
What is this?
A game development geometry utility that calculates the exact ordered sequence of hexagonal tiles traversed by a straight line or projectile.
How does it work?
Why use it?
Eliminates jagged line artifacts and ambiguous edge selection in hex-based game engines.
Calculates regular planar hexagonal coordinate interpolation.
Frequently Asked Questions
Want this capability on your Windows desktop?
Rainmeter Desktop Customization Engine
Powerful open-source desktop customization framework for hardware monitors, clocks, and audio visualizers.