Inspiration
A pool table takes up a whole room, and most of us don't have one. Quest 3 passthrough lets us put a full-size table on your floor, and hand tracking lets us to play without controllers: you grab and pull back the cue with your bare hands. We wanted it to feel like a real table in your living room, not a video game.
What it does
Bilardo is a single-player 8-ball pool game for VR.
- A realistic 8-ft table (real dimensions, 57 mm balls) stands on your real floor through passthrough.
- You play a full match against an AI opponent.
- Hand tracking only. There are no controllers and no 2D screens. Every button is a 3D panel you poke or pinch.
How to play
In order to enter WebXR mode click "Enter MR" button at the bottom of the screen. It will be visible only if WebXR is available.
- Move the table (left hand): pinch and move sideways to rotate the table around the cue ball. Pinch and move forward/back to slide it closer or further away. Turning the table is how you choose your shot direction.
- Aim (right hand): pinch and move sideways. Your hand holds the back of the cue, so it pivots on the cue ball. Just like in real life.
- Power: keep pinching and pull your hand back. The power bar and aim line show the shot.
- Shoot: release the pinch. Releasing with almost no pull cancels the shot.
- Ball in hand (right hand) (break or after a foul): pinch near the cue ball, drag it behind the head string and release.
- Wrist menu: turn your left palm toward your face for Restart / Recenter / Menu.
How we built it
Using WebXR with three.js, in plain JavaScript. These are the technologies I am most familiar with.
Challenges we ran into
- Hands-only controls that feel natural: Moving and aiming is hard to get, rotation wasn't easy especially when ball ended up around the corner.
- Aiming: Absolute hand aiming was jittery, but we wanted to keep it as it provided natural feeling.
- Supporting gameplay both sitting and moving around: We wanted to make the game work on multiple different positions, seated when players just wanted to have a relaxing game and moving around the pool table when they wanted to have an immersive experience.
- Keeping 72 fps on Quest: The AI search is spread over several frames so the headset never stutters.
- Testing without wearing the headset all day: We made use of Meta IWER extension on Chrome but still it is some movements are much easier to test on real device.
Accomplishments that we're proud of
- A complete, rule-correct 8-ball match.
- Real-scale physics that feels right in your hands.
What we learned
- In hand-tracking UX, small details (dead zones, axis locks, hysteresis on pinch) matter more than big features.
- Keeping physics, rules and AI free of rendering code made them easy to test and let the AI reuse the real physics to plan its shots.
- Passthrough MR needs grounding cues such as floor shadows and true scale to feel convincing.
What's next for Bilardo
- Online multiplayer, so two people can share one table in their own rooms.
- More game modes (9-ball, practice drills) and a Horizon Store release as a PWA.
Built With
- iwer
- javascript
