Function Polygon.ClosestPointOnTriangleByRef

ClosestPointOnTriangleByRef (in float3 a, in float3 b, in float3 c, in float3 p, out float3 output)

Closest point on the triangle abc to the point p.

Public Static
bool ClosestPointOnTriangleByRef (

in float3

a

in float3

b

in float3

c

in float3

p

out float3

output

)

Closest point on the triangle abc to the point p.

Takes arguments by reference to be able to be burst-compiled.

See

'Real Time Collision Detection' by Christer Ericson, chapter 5.1, page 141

Return

True if the point is inside the triangle, false otherwise, after the point has been projected on the plane that the triangle is in.