> For the complete documentation index, see [llms.txt](https://jorge-jgnz94.gitbook.io/hptk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jorge-jgnz94.gitbook.io/hptk/master/setup.md).

# Setup

Let's do it! 💪

## Getting started with HPTK

### 1. Obtain HPTK

In Unity Editor, open *Package Manager*. Click on *Add package from git URL* and paste the following URL:

```
https://github.com/jorgejgnz/HPTK.git
```

Click on *Add* and Unity will download the package. This package has no dependencies.

### 2. Project Settings (!)

HPTK relies on nVidia PhysX and Unity's built-in Configurable Joints to simulate hand physics. Please use the following recommended settings:

**Physics**

* **Default Solver Iterations:** 15-25.
* **Default Solver Velocity Iterations:** 5-15.
* **Friction Type:** One Directional Friction Type.
* **Solver Type:** Temporal Gauss Seidel.
* **Default Max Depenetration Velocity:** 0.1 (optional, recommended).
* **Default Max Angular Velocity:** 2.0 (optional, recommended).
* **Enable Adaptative Force:** enabled (optional, recommended).
* **Bounce Threshold:** 0.25 (optional, recommended).

**Time**

* **Fixed Timestep:** 0.01.
* **Maximum Allowed Timestep**: 0.1 (optional, recommended).

ProjectSettings/Physics properly configured should look like this: <img src="https://2698598769-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYpeL-Cll-FXMj9b3XC%2F-MYzJBCUtEWI2v-Lhs0N%2F-MYzJsZnvEFyF5jC5FoF%2Fprojectsettings.PNG?alt=media&amp;token=155fc111-5902-49c7-b5e6-a8a9efe3ac0e" alt="" data-size="line">&#x20;

{% hint style="info" %}
If you're having problems following these steps please [let us know](/hptk/master/community.md).
{% endhint %}

The following table shows a comparison of how this configuration affects the realism of the simulation:

| ![](https://camo.githubusercontent.com/2cac077f9374fa486b8d1d77c5171625624d8229e9d56a74c7783c0e75cdf9fe/68747470733a2f2f692e696d6775722e636f6d2f5338314f6b77752e676966) | ![](https://camo.githubusercontent.com/cbdf17722680da6dfff69600b417784cf745ed13f9c4ec66038ec9645b9ea1e7/68747470733a2f2f692e696d6775722e636f6d2f5674734f33424d2e676966) |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Default settings                                                                                                                                                        | Recommended settings                                                                                                                                                    |

### 3. Create the layer HPTK

**Create a new collision layer called HPTK in slot 8**. In *ProjectSettings/Physics*, modify the layer collision matrix to make **HPTK layer not to collide with Default or UI layers**.

The expected result after those changes is shown in the following images.

&#x20;<img src="https://2698598769-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYpeL-Cll-FXMj9b3XC%2F-M_kroD7OmlqVsv-32QU%2F-M_kwv47trB30-a8aMIw%2FcollisionLayer.PNG?alt=media&amp;token=d9fe7a6b-ec46-463a-9fff-fe37a71317e8" alt="" data-size="original"> <img src="https://2698598769-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYpeL-Cll-FXMj9b3XC%2F-M_kroD7OmlqVsv-32QU%2F-M_kwpAmZd_huDLUTpSt%2Flayer.PNG?alt=media&amp;token=0e4cc47c-afad-4224-8d64-bd3a67fd8d4f" alt="" data-size="original">&#x20;

### 4. Platform-Specific Steps

Now let's jump to the platform-specific part of the guide. Please select the target device for your application:

* [Oculus Quest 1/2](/hptk/master/setup/for-quest.md)
* [Vive / Vive Pro](/hptk/master/setup/basics.md)
* [WMR](/hptk/master/setup/basics.md)
* [OpenVR](/hptk/master/setup/basics.md)
* [Hololens 2](broken://pages/-MYzMjV8a36vn1ej3M_I)
* [Desktop (non-XR)](/hptk/master/setup/desktop.md)
