Documentation / Node reference / code nodes
code/SDFHexagon2D
Returns the distance to a 2D hexagon.
Sdf2d
Returns the distance to a regular hexagon in the XY plane. Its flat sides face up and down.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector2 | Position to measure from. Unwired, it uses the sample position. |
| t | Vector2 | Hexagon center. |
| r | Float | Distance from the center to the middle of a side. |
See also
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.