Skip to content

API > Plane


Plane⚓︎

Representation of a plane in 3D space.
See Unity Plane for more info.

Members⚓︎

Properties⚓︎

Name Description
Plane.distanceProperty Distance from the origin to the plane.
Plane.flippedProperty Returns a copy of the plane that faces in the opposite direction. (Read only)
Plane.normalProperty Normal vector of the plane.

Constructor⚓︎

Name Description
Plane(inNormal, inPoint)Constructor Creates a plane.
Plane(inNormal, d)Constructor Creates a plane.
Plane(a, b, c)Constructor Creates a plane.

Methods⚓︎

Name Description
Plane.ClosestPointOnPlane(point) Method For a given point returns the closest point on the plane.
Plane.Flip() Method Makes the plane face in the opposite direction.
Plane.GetDistanceToPoint(point) Method Returns a signed distance from plane to point.
Plane.GetSide(point) Method Is a point on the positive side of the plane?
Plane.Raycast(ray) Method Intersects a ray with the plane.
Plane.SameSide(point0, point1) Method Are two points on the same side of the plane?
Plane.Set3Points(a, b, c) Method Sets a plane using three points that lie within it. The points go around clockwise as you look down on the top surface of the plane.
Plane.SetNormalAndPosition(inNormal, inPoint) Method Sets a plane using a point that lies within it along with a normal to orient it.
Note that the normal must be a normalised vector.
Plane.Translate(translation) Method Moves the plane in space by the translation vector.

Static Methods⚓︎

Name Description
Plane.Translate(plane, translation) Static fieldMethod Returns a copy of the given plane that is moved in space by the given translation.

Extra Detail⚓︎

A plane is an infinitely large, flat surface that exists in 3D space and divides the space into two halves known as half-spaces. It is easy to determine which of the two half-spaces a particular point is in and also how far the point is from the plane. Walls, floors and other flat surfaces are common in games, so a plane is sometimes useful for mathematical calculations with these objects. Also, there are cases where a real surface does not exist but it is useful to imagine that one is there. For example, in sports, a goal line or out-of-bounds line is often assumed to extend into the air, effectively defining a plane.