API Referenceglobal
Lineclass
Represents a line in 3D space.
object→Line
Constructors2
Showing 2 constructors
No results match this filter.
Methods7
Showing 7 methods
public float SqrDistance(Vector3 pos)
Returns closest squared distance from this line to given point.
| Parameter | Type | Description |
|---|---|---|
| pos | Vector3 | — |
Returns:
float—public bool Trace(Ray ray, float radius, float maxDistance = 3.4028235E+38)
Perform a "trace" between this line and given ray. If the 2 lines intersect, returns true.
| Parameter | Type | Description |
|---|---|---|
| ray | Ray | The ray to test against. |
| radius | float | Radius of this line, which essentially makes this a capsule, since direct line-to-line intersections are very improbable. Must be above 0. |
| maxDistance = 3.4028235E+38 | float | Maximum allowed distance from the origin of the ray to the intersection. |
Returns:
boolWhether there was an intersection or not.No results match this filter.
Properties4
Showing 4 properties
No results match this filter.