Documentation / Node reference / code nodes
code/SDFSphere
Returns the distance to a sphere, whole or cut flat.
Sdf3d
Returns the distance to a sphere. With cut on, a horizontal plane slices it flat and the part above stays.
Parameters
| Name | Type | What it does |
|---|---|---|
| cut | Bool | Cut flat with a horizontal plane, keeping the top. |
| P | Vector3 | Position to measure from. Unwired, it uses the sample position. |
| t | Vector3 | Sphere center. |
| s | Float | Sphere radius. |
| cutHeight | Float | Height of the cut above the center. |
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.