Plane.SetNormalAndPosition
SetNormalAndPosition(inNormal: Vector3, inPoint: Vector3): void;
Parameters

inNormal The plane's normal vector.
inPoint A point that lies on the plane.
Description

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.
var fieldLength: float;
var fieldWidth: float;
var goalLine1: Plane;
var goalLine2: Plane;
var leftSideLine: Plane;
var rightSideLine: Plane;

function Start () { // Set up goal lines of a playing field. goalLine1.SetNormalAndPosition(Vector3.forward, Vector3.forward * fieldLength / 2); goalLine1.SetNormalAndPosition(-Vector3.forward, -Vector3.forward * fieldLength / 2); // Set up side lines. leftSideLine.SetNormalAndPosition(-Vector3.right, -Vector3.right * fieldWidth / 2); leftSideLine.SetNormalAndPosition(Vector3.right, Vector3.right * fieldWidth / 2); }
See Also: Set3Points.