> For the complete documentation index, see [llms.txt](https://maxim218.gitbook.io/unity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://maxim218.gitbook.io/unity/pozitsiya-otnositelno-geroya.md).

# Позиция относительно героя

Создаём новый примитив.

```
GameObject ccc = GameObject.CreatePrimitive(PrimitiveType.Cube);
```

Задать положение примитива перед объектом.

```
ccc.transform.position = transform.TransformPoint(Vector3.forward * 1.5f);
```

Задать положение примитива сзади объекта.

```
ccc.transform.position = transform.TransformPoint(Vector3.forward * 1.5f * (-1));
```

Задать положение примитива справа от объекта.

```
ccc.transform.position = transform.TransformPoint(Vector3.right * 1.5f);
```

Задать положение примитива сверху от объекта.

```
ccc.transform.position = transform.TransformPoint(Vector3.up * 1.5f);
```
