Documentation / Node reference / code nodes

code/SDFArc2D

Returns the distance to a 2D arc.

Sdf2d

Returns the distance to a circular arc in the XY plane. The arc runs counter-clockwise from angleStart to angleEnd, and equal angles give the full circle. It is an open curve, so the distance is never negative.

Parameters

Name Type What it does
P Vector2 Position to measure from. Unwired, it uses the sample position.
t Vector2 Center of the arc's circle.
r Float Radius of the arc's circle.
angleStart Float Start angle, in degrees counter-clockwise from X.
angleEnd Float End angle. The arc always runs counter-clockwise to it.

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.