> ## Documentation Index
> Fetch the complete documentation index at: https://docs.altoura.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Anchoring

> There are three ways to anchor

1. Single Anchoring
2. Two-Step Anchoring
3. QR Anchoring

## Metadata - Anchoring Matrix

| Number | MetaData                                                |                                                                                                                                                                                                                                                                              |
| ------ | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1      | IsQRAnchoring : True <br /> IsRealWorldAligned : True   | Default Anchoring is QR Code <br /> QR Code Anchoring enabled <br /> 2PA is enabled <br /> Single Anchoring is not available <br /> Single Teleport should not work <br /> Group Teleport should not work <br /> Continuous tracking (Auto scan of QR Code)                  |
| 2      | IsQRAnchoring : False <br /> IsRealWorldAligned : False | Default Anchoring is Single Anchoring <br /> QR Code Anchoring disabled <br /> 2PA is disabled <br /> Single Anchoring is enabled <br /> Single Teleport should work <br /> Group Teleport should work <br /> No continuous tracking (Auto scan of QR Code)                  |
| 3      | IsQRAnchoring : True <br /> IsRealWorldAligned : False  | Default Anchoring is QR Code Anchoring <br /> QR Code Anchoring enabled <br /> 2PA is enabled on manual anchor <br /> Single Anchoring is disabled <br /> Single Teleport should work <br /> Group Teleport should work <br /> No continuous tracking (Auto scan of QR Code) |
| 4      | IsQRAnchoring : False <br /> IsRealWorldAligned : True  | Default Anchoring is 2 PA <br /> QR Code Anchoring disabled <br /> 2PA is enabled <br /> Single Anchoring is disabled <br /> Single Teleport should not work <br /> Group Teleport should not work <br /> No continuous tracking (Auto scan of QR Code)                      |

## 1. Single Point Anchoring

Single Point Anchoring Helps you to place the space with single step

## 1.1 Video Demo

## 1.2 Setup

This is the default behaviour and we dont need to do any special setup

## 1.3 How to Use

Single Point Anchoring happens in One Step

1. Place the anchor at the required ground level and orientation of the space is taken by the direction at which the user is facing while placing this anchor

## 2. Two Point Anchoring

Single Point Anchoring Helps you to place the space with two steps

## 2.2 Setup

* Use the space metadata IsRealWorldAligned and set it to true for the space

<img src="https://mintcdn.com/altoura-785c3552/RIgkSrBJFuycivOX/images/docs/fbc3d37-Screenshot_7.png?fit=max&auto=format&n=RIgkSrBJFuycivOX&q=85&s=e3ffae3546b078244f0cebb8f7ff09b8" alt="" width="739" height="76" data-path="images/docs/fbc3d37-Screenshot_7.png" />

## 2.3 How to Use

Single Point Anchoring happens in Two Steps

1. Place the first anchor at the required ground level

2. Place the second anchor in the direction in which you want the space to be aligned

## 3. Qr Anchoring

## 2.1 Video Demo

This feature allow you to place anchor with help of QR code.

## 3.1 Video Demo

<video controls src="https://studio216.blob.core.windows.net/video/MobileQrAnchoring.mp4" />

## 3.2 Setup

There are a few things you need to do to add QR Code Anchoring to your space.

* Use the space metadata IsQRAnchoring and set it to true for the space
* Use the space metadata QrWidth to set the width of the QrCode
* Make sure the Y axis of DefaultMeeplePosition in your space points up
* Print the QR code given below on an A4 sheet or above

<img src="https://mintcdn.com/altoura-785c3552/FoIV9SzgFfYMUXXv/images/docs/38369b6-Screenshot_5.png?fit=max&auto=format&n=FoIV9SzgFfYMUXXv&q=85&s=7f7cb4b187d990e1630ac1d37b609346" alt="" width="794" height="687" data-path="images/docs/38369b6-Screenshot_5.png" />

## 3.3 How to Use

Once you've set up your space to allow QR anchoring, follow these steps to use the QR code in the app:

1. Place the QR Code print out on the ground
2. Load the project
3. When it asks to look for the QR code, look at the QR code on the ground

The space should then be now placed on the QR code. With Gameobject aligning to the QR code and forward of the game object aligning to the forward of the QR

<img src="https://mintcdn.com/altoura-785c3552/pvN_b_9fLlPnvtUQ/images/docs/13e9922-Capn_Robby.png?fit=max&auto=format&n=pvN_b_9fLlPnvtUQ&q=85&s=1c2dea071680ceb8219d683f820c5526" alt="" width="800" height="600" data-path="images/docs/13e9922-Capn_Robby.png" />

## 3.4 Download the QR Code

**Low Accuracy QR Code** — works on both HoloLens and Mobile

[![Low Accuracy QR Code](https://studio216.blob.core.windows.net/tools/ZeroCode.png)](https://studio216.blob.core.windows.net/tools/ZeroCode.png)

[Download Low Accuracy QR Code](https://studio216.blob.core.windows.net/tools/ZeroCode.png)

**High Accuracy QR Code** — works only on Mobile

[![High Accuracy QR Code](https://studio216.blob.core.windows.net/tools/MobileZeroCode.png)](https://studio216.blob.core.windows.net/tools/MobileZeroCode.png)

[Download High Accuracy QR Code](https://studio216.blob.core.windows.net/tools/MobileZeroCode.png)

## 3.5 Custom QR Codes

Custom QR Codes can be achieved in three Steps

1. Add Metadata in the space to fill in the details of the game object to be overlapped on the QR Code

   **id** - Any 10-digit number with "q\_" prefix in the beginning **GameobjectName** - Name of the Gameobject you want to align the QR code with **OffsetPosX** - Position Offset in X Direction from the Gameobject **OffsetPosY** - Position Offset in Y Direction from the Gameobject **OffsetPosZ** - Position Offset in Z Direction from the Gameobject **OffsetRotX** - Rotation Offset Along X-Axis of the Gameobject **OffsetRotY** - Rotation Offset Along Y-Axis of the Gameobject **OffsetRotZ** - Rotation Offset Along Z-Axis of the Gameobject

<CodeGroup>
  ```bash bash theme={null}
  {"QrDataJsons":{"QrDataJsonList":[{"id":"q_0000000001","GameobjectName":"DefaultMeeplePosition","OffsetPosX":0,"OffsetPosY":0,"OffsetPosZ":0,"OffsetRotX":0,"OffsetRotY":0,"OffsetRotZ":0},{"id":"q_0000000002","GameobjectName":"DefaultMeeplePosition","OffsetPosX":0,"OffsetPosY":-1.26,"OffsetPosZ":0,"OffsetRotX":0,"OffsetRotY":0,"OffsetRotZ":0}]}}
  ```
</CodeGroup>

2. Create a Qr code with the same id given in the above JSON (without q\_) with the following JSON structure

   **Qrcode** - 10-digit number without "q\_" prefix defined in the previous step **Weight** - Random string just to increase the complexity of QR to get better Tracking

<CodeGroup>
  ```bash bash theme={null}
  {"Qrcode": "0000000001","Weight": "000000000000000000000000000000"}
  ```
</CodeGroup>

3. Print the Qr code and measure the width of the QR code in meters and update it in the space meta

<img src="https://mintcdn.com/altoura-785c3552/_Fb1P96m80-mEejg/images/docs/3ed9d84-Screenshot_6.png?fit=max&auto=format&n=_Fb1P96m80-mEejg&q=85&s=6715df63a26b3b7fa6bd62dc71c96be3" alt="" width="720" height="121" data-path="images/docs/3ed9d84-Screenshot_6.png" />
