Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SignedDistanceToPoint(float3)

Get the signed distance from the point to the plane.
Read time 1 minuteLast updated 12 days ago

Definition

public float SignedDistanceToPoint(float3 point)

Parameters

point

Point to find the signed distance with.

Returns

Type

Description

floatSigned distance of the point from the plane.

Remarks

Plane must be normalized prior to calling this function. Distance is positive if point is on side of the plane the normal points to, negative if on the opposite side and zero if the point lies in the plane. Avoid comparing equality with 0.0f when testing if a point lies exactly in the plane and use an approximate comparison instead.