Documentation / Node reference / code nodes
code/SDFCapsule
Returns the distance to a capsule.
Sdf3d
Returns the distance to a capsule: a line segment thickened by a radius, with round caps.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector3 | Position to measure from. Unwired, it uses the sample position. |
| t | Vector3 | Capsule center. a and b are offsets from it. |
| a | Vector3 | First end of the segment, relative to the center. |
| b | Vector3 | Second end of the segment, relative to the center. |
| r | Float | Radius around the segment. |
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.