Overview
The YawVR Motion Platform is the software that connects VR games to the Yaw 3, a motion simulator chair that can pitch, roll and spin a full 360 degrees. The chair is controlled by a Raspberry Pi running a closed-source server, and since the company behind it no longer exists, that server can’t be updated or fixed anymore.
I worked on this alongside two team projects, Wyvern Glide and Race N Rally. My teammates built the games, while my primary focus was everything between the game and the motors: reworking the Unity SDK and building a complete replacement for the server in Rust.
The Challenge
The core objective was to make the chair reliable enough to put players in it. Since a real person sits in this machine, it has to be safe as well as fun.
The original setup had a few big problems. The SDK had to be connected manually and couldn’t detect when the connection to the chair dropped. Without motion compensation, the VR headset picked up the chair’s movement as head movement, which made the view drift around. On top of that, the server was a closed binary with no documentation. To replace it, I first had to figure out what it actually did, and then recreate its motor control exactly, because the chair’s tuning depends on it.
Architecture
The game scripts send the position they want the chair in to the Unity SDK. The SDK can talk to either the original server or my Rust server with a single checkbox, so the game code never has to change. The network communication runs on its own background thread in Unity, so it doesn’t slow down the game.
On the Pi, the Rust server is split into three parts that run separately: a network task for the connection to the game, an engine thread that controls the motors 100 times per second, and a safety thread that watches the emergency stop. They only share data in ways that can’t block each other.
Tech Stack
- Server Language: Rust
- Client Language: C#
- Engine: Unity
- Hardware: Raspberry Pi + Yaw 3 motor boards
- Networking: Custom UDP protocol with HMAC authentication
- Reverse Engineering: Ghidra
Features
- Automatic Connection: The game finds the chair on the network and connects without any manual setup.
- Motion Compensation: Cancels out the chair’s movement in the VR camera, so the view stays stable and comfortable.
- Connection Loss Detection: If the connection drops, the chair safely parks itself and reconnects automatically.
- Emergency Stop: A lock-free e-stop that is checked on every single motor update and can never get stuck waiting.
- Authenticated Protocol: Every packet is signed, so only the game can control the chair.
- Easy Switching: The Rust server installs next to the original one, and a migration tool carries over the chair’s old settings, so you can always switch back.
Technical Problems & Solutions
1. Replacing a Closed-Source Server
- The Problem: The chair’s motor tuning is built around the original server. If my version moved even slightly differently, the chair could overshoot or start shaking, with a person sitting in it.
- The Solution: I reverse-engineered the original server with Ghidra and ported the motor control to Rust. I wrote tests that compare my output to the original’s output bit for bit, and to data recorded from the real chair.
- The Result: The chair moves exactly like it did before, but now with a proper safety layer around it and around 180 tests backing it up.
2. Keeping the Network Away From the Motors
- The Problem: Network lag, slow logging or a crash should never be able to delay or mess up the commands going to the motors.
- The Solution: I gave the motors their own dedicated thread that runs at a fixed 100 updates per second. The network and logging run separately and can only send it messages, never block it. If anything crashes, the motors are immediately told to stop.
- The Result: On the real chair under full load, the worst delay was 0.55 ms and not a single update ran late.
3. Testing on Real Hardware
- The Problem: Software that has only run in a simulator isn’t safe to sit in.
- The Solution: I made a step-by-step test plan that went from simulator-only all the way to someone riding it, and only moved on once a stage passed. I tested things like unplugging the network, hitting the e-stop mid-movement and force-killing the server.
- The Result: This caught and fixed several hardware timing bugs before anyone sat in it. The final ride tests, including full spins at 150 degrees per second, ran without a single fault.
Used In
Wyvern Glide
A VR game where you fly a dragon through a course of checkpoints against the clock, while the chair pitches and banks along with the dragon. This was the first game to run on the Rust server.
Race N Rally
A VR rally racing game with a co-driver calling out the turns, where the chair throws you around with every corner and bump.