Documentation / Node reference / code nodes
code/SDFEquilateralTriangle2D
Returns the distance to a 2D equilateral triangle.
Sdf2d
Returns the distance to an equilateral triangle in the XY plane, pointing up.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector2 | Position to measure from. Unwired, it uses the sample position. |
| t | Vector2 | Triangle center, equally far from all three sides. |
| r | Float | Half the length 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.