Skip to content

surreal-interactive/SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surreal Touch: VR Gaming Controller for Apple Vision Pro

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.

Get Started

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.

  1. You can use Surreal VR SDK based on a brand new project, please follow Step-by-Step Instruction below.

  2. 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.

description

ℹ️ Versions of Unity prior to 2022.3 are not supported.

Step-by-Step Instruction

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:

One-to-one mapping

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)

Step-by-Step Instruction

Then, step-by-step operations are as follows:

  1. 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.

description

  1. 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.

description

  1. Check visionOS in Project Settings

description

  1. Put SVRCameraRig into your scene

    SVRCameraRig accurately mirrors the real-world poses of the controllers.

description

  1. 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 under Assets/Editor in your project(create if Editor folder not existed) and build.

description

  1. Request permissions

    Open the xcode project, request bluetooth permission by adding "Privacy - Bluetooth Always Usage Description" in plist document.

    If you put SVRBuildPostProcessor.cs under Assets/Editor in your project as step 5 shown, all permission settings should have already been setup properly.

description

  1. 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:

340678131-41277564-a7dd-42bd-88d6-404513caec10.webm

About

SDK for Surreal Touch: #1 Controllers for Apple Vision Pro

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •