Documentation / Node reference / code nodes

code/SDFTorus

Returns the distance to a torus, whole or open.

Sdf3d

Returns the distance to a torus, its ring in the XZ plane. Open, it becomes an arc centered on +Z, with the gap facing -Z.

Parameters

Name Type What it does
open Bool Sweep an arc instead of a whole ring.
P Vector3 Position to measure from. Unwired, it uses the sample position.
t Vector3 Torus center.
R Float Distance from the center to the middle of the tube.
r Float Tube radius.
angle Float Swept angle of the arc, in degrees.

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.