Surreal Touch, developed by Surreal Interactive, is a VR gaming controller specifically designed for the Apple Vision Pro. This product aims to bridge the gap between the most immersive hardware and the vibrant VR game ecosystem.
We are dedicated to provide seamless support for developers, enabling them to port their exceptional VR games to this new platform effortlessly. With Surreal Touch, you can bring the most engaging and interactive VR experiences to life on the Apple Vision Pro.
In this tutorial, we will introduce how to create a visionOS application powered by Surreal Touch.
You can choose how to use it based on your situation.
-
You can use Surreal VR SDK based on a brand new project, please follow Step-by-Step Instruction below.
-
You can port your developed applications based on other SDKs(for example Oculus) to Surreal Touch visionOS in a simple way, a neat Unity Starter Sample which is pretty similar to Oculus Unity-StarterSamples is provided, there's a full-functionality scene where players can interact with and throw various game objects, showcasing the system's capabilities.
You can try to build and run this example first before you dive into Surreal VR SDK.
ℹ️ Versions of Unity prior to 2022.3 are not supported.
Surreal VR SDK (SVR) is designed to offer a plug-and-play experience for developers.
To ensure a smooth experience for developers who are familiar with Oculus SDK, an overview of the one-to-one mapping for controller-related operations is shown below:
Oculus VR SDK | Surreal VR SDK | |
---|---|---|
Unity Package | Oculus Unity Documentation | Surreal VR SDK GitHub |
Camera Rig Prefab | OVRCameraRig |
SVRCameraRig |
Button Down | OVRInput.GetDown(OVRInput.RawButton.A) |
SVRInput.GetDown(SVRInput.Button.A) |
Button Up | OVRInput.GetUp(OVRInput.RawButton.X) |
SVRInput.GetUp(SVRInput.RawButton.X) |
Thumbstick State | OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick) |
SVRInput.Get(SVRInput.Axis2D.LThumbstick) |
Thumbstick Pressed | OVRInput.Get(OVRInput.Button.PrimaryThumbstick) |
SVRInput.Get(SVRInput.Button.LThumbstick) |
Thumbstick Up | OVRInput.Get(OVRInput.Button.PrimaryThumbstickUp) |
SVRInput.Get(SVRInput.Button.LThumbstickUp) |
Index Trigger State | OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger) |
SVRInput.Get(SVRInput.Axis1D.RIndexTrigger) |
Left Index Trigger Pressed | OVRInput.Get(OVRInput.RawButton.LIndexTrigger) |
SVRInput.GetDown(SVRInput.RawButton.LIndexTrigger) |
Then, step-by-step operations are as follows:
-
Install visionOS required packages which including:
-
"com.unity.polyspatial"
-
"com.unity.polyspatial.visionos"
-
"com.unity.polyspatial.xr"
It's recommended to follow Install a UPM package from a Git URL.
ℹ️ Project is tested under PolySpatial version 1.1.4.
-
-
Install Surreal Touch Unity package
Install package
"https://github.com/surreal-interactive/SDK.git?path=/Assets"
.It's recommended to follow Install a package from a Git URL by manifest.
ℹ️ If you get errors about functions of Surreal VR SDK are not accesible, remember switching building platform to visionOS.
- Check
visionOS
inProject Settings
-
Put
SVRCameraRig
into your sceneSVRCameraRig
accurately mirrors the real-world poses of the controllers.
-
Build Unity project
Everything is setup in Unity, switch your target platform to visionOS, a xcode project will be created after building is finished.
Permissions including bluetooth connection are required, you can do the settings in xcode project after Unity building is done, we also provide the script
SVRBuildPostProcessor.cs
which can help you applying required permissions automatically, put this script underAssets/Editor
in your project(create ifEditor
folder not existed) and build.
-
Request permissions
Open the xcode project, request bluetooth permission by adding
"Privacy - Bluetooth Always Usage Description"
in plist document.If you put
SVRBuildPostProcessor.cs
underAssets/Editor
in your project as step 5 shown, all permission settings should have already been setup properly.
-
All Done!
Everything is done, now you can build your xcode project and don't forget to connect Surreal Touch controllers to Apple Vision Pro in
Settings/Bluetooth
in your device!
A complete sample project is provided in Unity-StarterSamples
.
Video here: