# GetWorldCorners(Vector3[])

> Get the corners of the calculated rectangle in world space.

## Definition

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

```csharp
public void GetWorldCorners(Vector3[] fourCornersArray)
```

### Parameters

**** (\[Vector3\[]]\(/engine/6000.5/script-reference/unityengine/vector3)): The array that corners are filled into.

### Remarks

Each corner provides its world space value.  The returned array of 4 vertices is clockwise.  It starts bottom left and rotates to top left, then top right, and finally bottom right.  Note that bottom left, for example, is an (x, y, z) vector with x being left and y being bottom.

**Note**: If the [RectTransform](/engine/6000.5/script-reference/unityengine/recttransform.md) is rotated in Z then the dimensions of the [RectTransform.GetWorldCorners](/engine/6000.5/script-reference/unityengine/recttransform/getworldcorners.md) will be changed.

```csharp
using UnityEngine;

// GetWorldCorners():
//  Access the RectTransform and read the vertices
//  that define the location and size of the
//  object.

public class ExampleClass : MonoBehaviour
{
    RectTransform rt;

    void Start()
    {
        rt = GetComponent<RectTransform>();
        DisplayWorldCorners();
    }

    void DisplayWorldCorners()
    {
        Vector3[] v = new Vector3[4];
        rt.GetWorldCorners(v);

        Debug.Log("World Corners");
        for (var i = 0; i < 4; i++)
        {
            Debug.Log("World Corner " + i + " : " + v[i]);
        }
    }
}
```

Additional Resources: [RectTransform.GetLocalCorners](/engine/6000.5/script-reference/unityengine/recttransform/getlocalcorners.md).
