---
# System prepended metadata

title: WTF is the code

---

# WTF is the code

Quest 3 | OpenXR | Normcore | Piglet | GG

We use OpenXR's API for controller and device stuff. There's issues with Unity's Interaction Toolkit for our specific use case (for now).

**Normcore** is the multiplayer SDK and it works nicely to sync up users in space. It's ON by default

**Piglet** is a GLTF support package that makes working with GLBs really nice in Unity, we've been using GLTF as a standard anticipating we'll eventually stream 3D content

**GG** is our backend code that connects headsets to point of sales so the games can make money in the arcade. It will soon support highscores, collectibles, and cool things like that

![Screenshot 2024-02-29 at 6.04.01 PM](https://hackmd.io/_uploads/SJxovnR2p.png)


**Heartbeat**
Not important, just a convenient way to manage Update loops and Delays if you'd like to use it!

**Realtime + VR Player**
This is standard NormCore setup to auto-instantiate a multiplayer session with VR-ready avatars. The avatar can be upgraded and changed by editing `AR Player.prefab`

**SyncAnchor**
This is a parent to the camera and general VR stuff to make the processes in StationSyncer (below) work. You probably won't have to change anything here!

**StationSyncer**
We have a novel way to anchor content in real world space via IoT-powered stands. `StationSyncer.cs` handles that by setting the origin of the Unity Scene to the position of the stand's controller holders

You can design your Unity scene as normal, just be aware that the floor height is preset to -1.11m

There are a few scans of the Office/Campus, Arcade, and Parking lot which you can use to design the content

The tricky part will be lining up your Unity scene with the real life environment, which may be a bit of trial and error

If you want to quickly test stuff I recommend switching `SyncKey` to `DESK`, then you just place your controllers down side by side next to each other anywhere and the scene will center there

**Game**
Nothing too important in here, recommend using the `FloorOffset` to zero out your level to the floor easier

**AR Player.prefab**
This is where a lot of the work will be. Laser gun should be here, client score, etc.

**LaserTag**
There's a basic shooter setup in there. It's not networked but can be made so with Normcore. Add the laser gun to the AR Player as a start point. Then Realtime Instantiate the projectile so it appears in both players session