primdist
expression function
Returns the minimum distance and closest points between two primitives.
See also: pointdist, xyzdist, nearpoint
Usage
primdist(surface_node, prim1_num, surface_node, prim2_num, return_type)
-
return_type = 0: minimum distance
-
return_type = 1: U value of closest point on primitive 1
-
return_type = 2: V value of closest point on primitive 1
-
return_type = 3: U value of closest point on primitive 2
-
return_type = 4: V value of closest point on primitive 2
Only works for faces, curves, and spline surfaces. Other types of primitives will always return 0.
Examples
primdist("/obj/geo1/sphere1", 0, "/obj/geo1/grid1", 0, 0)
Returns the distance between the first primitives in both sphere1 and grid1.