Skip to main content
‹ Back to Tutorials
Intermediate Unity

Unity VR XR Toolkit - How to Make a VR Rhythm Beat Game

Oct 17, 2022
About this tutorial

In this Unity VR XR Toolkit tutorial, I'll show how to make a VR rhythm beat game like Beat Saber or Synth Riders. Here is how to start setting up the scene ► Art Assets - Polyverse Skies https://assetstore.unity.com/packages/vfx/shaders/polyverse-skies-low-poly-skybox-shaders-104017?aid=1101lfDIN

Written Guide

This tutorial lays the foundation for a VR rhythm game in the style of Synth Riders: a working XR rig, a striking skybox, and colored spheres attached to each controller. It assumes you've already set up a core VR project with the XR Interaction Toolkit — if not, do that first — and builds the scene from an empty stage with just a main camera and a directional light.

Step 1 — Add the XR Origin

Right-click in the hierarchy, go to XR, and add XR Origin (Action-based). This adds two game objects — the XR Interaction Manager and the XR Origin — and moves your main camera inside the origin's Camera Offset alongside the left- and right-hand controllers. Reset the XR Origin's transform so it sits at position 0, 0, 0; starting anywhere else offsets the whole play space.

Step 2 — Hook up the input actions

On the XR Interaction Manager, add an Input Action Manager component, click the plus, and assign the XRI Default Input Actions that come with the XR Interaction Toolkit samples. That's the last piece of plumbing — put the headset on and the controllers work with their ray interactors. Drop a temporary 3D cube at the origin, push it out on the Z axis so it sits in front of you, and confirm you can see it in the headset.

Step 3 — Swap in a stylized skybox

An empty horizon won't sell a rhythm game, so the scene gets an instant glow-up from the Polyverse Skies asset (by Boxophobic). In the Lighting settings, swap the default skybox material for one of the Polyverse sky materials — sky 4's pink-and-blue gradient with stars fits the synthwave vibe. One material swap and the whole scene mood changes. Delete the test cube; it's done its job.

Step 4 — Build the hand spheres

Create a sphere, reset it to the zero position, and scale it to about 0.1 — you can fine-tune size later. Make a material named right hand, set it to metallic with a bright pink color, and apply it. Duplicate the sphere (Ctrl/Cmd+D), rename it left hand, and give it its own left hand material in a blue that complements the sky. Drag both spheres into your Prefabs folder — they turn blue in the hierarchy to confirm they're prefabs — then delete them from the scene.

Step 5 — Attach the spheres to the controllers

Here's the neat part: you don't need any code to put objects in the player's hands. Each hand's XR Controller component has a Model Prefab slot near the bottom — whatever prefab you assign there becomes the controller's visible model. Set the left hand prefab on the left controller and the right hand prefab on the right, throw on the headset, and you're holding a pink sphere and a blue sphere under a synthwave sky. That's the base every beat game builds on — the next episodes add the targets to hit.

Unity tools by Bliz Studio
Built for our own games — now on the Asset Store

Multi Tag — unlimited hierarchical tags for any GameObject. Hierarchy Pro — style your whole hierarchy with rules. Made by a Unity dev, for Unity devs.

Explore our Unity assets →