# SetNormalAndPosition

> Sets a plane using a point that lies within it along with a normal to orient it.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## SetNormalAndPosition(Vector3, Vector3)

Sets a plane using a point that lies within it along with a normal to orient it.

```csharp
public void SetNormalAndPosition(Vector3 inNormal, Vector3 inPoint)
```

### Parameters

**** (\[Vector3]\(/engine/6000.6/script-reference/unityengine/vector3)): The plane's normal vector.**** (\[Vector3]\(/engine/6000.6/script-reference/unityengine/vector3)): A point that lies on the plane.

### Remarks

Note that the normal must be a *normalised* vector.

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    public float fieldLength;
    public float fieldWidth;
    public Plane goalLine1;
    public Plane goalLine2;
    public Plane leftSideLine;
    public Plane rightSideLine;

    void 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);
        rightSideLine.SetNormalAndPosition(Vector3.right, Vector3.right * fieldWidth / 2);
    }
}
```

Additional Resources: [Plane.Set3Points](/engine/6000.6/script-reference/unityengine/plane/set3points.md).

## SetNormalAndPosition(Vector3, Vector3)

Sets a plane using a point that lies within it along with a normal to orient it.

```csharp
public void SetNormalAndPosition(in Vector3 inNormal, in Vector3 inPoint)
```

### Parameters

**** (\[Vector3]\(/engine/6000.6/script-reference/unityengine/vector3)): The plane's normal vector.**** (\[Vector3]\(/engine/6000.6/script-reference/unityengine/vector3)): A point that lies on the plane.

### Remarks

Note that the normal must be a *normalised* vector.

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    public float fieldLength;
    public float fieldWidth;
    public Plane goalLine1;
    public Plane goalLine2;
    public Plane leftSideLine;
    public Plane rightSideLine;

    void 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);
        rightSideLine.SetNormalAndPosition(Vector3.right, Vector3.right * fieldWidth / 2);
    }
}
```

Additional Resources: [Plane.Set3Points](/engine/6000.6/script-reference/unityengine/plane/set3points.md).
