# AR Navigation

## AR Navigation

출발 위치와 도착 위치를 지정해서 네비게이션 경로를 얻을 수 있는 코드는 아래와 같습니다. 만약 현재 사용자 위치로부터 네비게이션 경로를 얻고 싶으면 **arCamera.tranform.position**을 **출발 위치**로 지정하시면 됩니다. 이 경우, 위치 인식이 성공적으로 수행한 후에 올바른 결과를 얻을 수 있습니다.

{% code title="MaxstSceneManager.cs" %}

```bash
public void OnClickNavigation()
{
    NavigationController navigationController = vPSStudioController.GetComponent<NavigationController>();
    navigationController.MakePath(arCamera.transform.position, new Vector3(77.975977f, 0, 71.859565f), serverName);
}
```

{% endcode %}

**NavigationController**는 VPSStudio GameObject로부터 얻을 수 있습니다. NavigationController의 인스턴스의 MakePath()를 통해서 출발 위치로 부터도착  위치까지 경로를 얻을 수 있습니다.

![AR Navigation 샘플](/files/-MbAX7pD3E3CqSoGAUh_)

{% hint style="info" %}
목적지 위치는 VPS 공간지도 메쉬를 기준으로 3차원 좌표값을 입력하면 됩니다.&#x20;

* **arCamera.transform.position**은 VPS 공간지도 좌표계 상 카메라의 위치 입니다.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://maxstvps.gitbook.io/documentation-kor/-MbEL2Y-3KF353rqES6S/samples/ar-navigation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
