Representation of a plane in 3D space.
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.
When a plane passes through the <0,0,0> point in world space, it is defined simply by a normal vector that determines which way it faces. It is easy to visualise this if you imagine looking at the plane edge-on.Plane | Creates a plane. |
GetDistanceToPoint | Returns a signed distance from plane to point. |
GetSide | Is a point on the positive side of the plane? |
Raycast | Intersects a ray with the plane. |
SameSide | Are two points on the same side of the plane? |
Set3Points | 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. |
SetNormalAndPosition | Sets a plane using a point that lies within it along with a normal to orient it. |