The Cyberith Virtualizer SDK header image

The Cyberith SDK for VR Locomotion & Haptic Feedback: Unity & Unreal Engine

Cyberith
Cyberith Virtualizer VR Treadmills
7 min readFeb 24, 2020

--

This article provides a basic introduction into the Cyberith Virtualizer SDK (“CybSDK”), how it works and how it is integrated in Unity & Unreal Engine. It has two features, that work independently of each other:

  • The locomotion, which represent the main functionality
  • The haptic feedback, which is an optional side feature

The CybSDK comes within fully prepared Plugins for Unity and for Unreal Engine as well as natively in C#, C++ & Python. While the Plugins allow for a very simple integration of the Virtualizer into your Unity or Unreal Engine projects, the native SDK allows to implement the Virtualizer into any other types of applications.
The Virtualizer can be used for VR applications in combination with HMDs (Head Mounted Displays) or CAVEs, but can also serve completely different purposes like controlling a robot (telepresence).

This article focuses on the integration of the CybSKD into Unity and Unreal Engine. We released a separate article focused on the native SDKs & the locomotion data as well:

Integrating the CybSDK into Unity

We are offering a Unity plugin to simplify the integration of Cyberith Virtualizer products into Unity projects. The Plugin uses the native C# CybSDK, that will be described in greater detail in a separate article.

In addition to libraries, Unity scripts and prefabs, this package also contains a sample scene with the Unity plugin integrated. This sample scene shows the functionalities of the plugin.

— Overview:

Screenshot of a Unity Project with the Cyberith Virtualizer SDK implemented

The Unity plugin has been designed with compatibility in mind. It is split into multiple inter-compatible script components that you can use, alter or swap out completely:

  • CVirtDeviceController:
    This script has full authority over the Virtualizer. Here, the device is selected, a connection is established and managed.
  • CVirtPlayerController:
    This script moves the player character according to the Virtualizer input. It uses a standard Unity PlayerController component.
  • CVirtHapticListener:
    This script receives haptic feedback emitted by all active HapticEmitters in a defined range. This component also activates the Virtualizer’s haptic vibration unit.
  • CVirtHapticEmitter:
    This script emits haptic feedback in a customizable radius around it, to be received by a HapticListener.

— Locomotion:

The main functionality of the Cyberith Virtualizer is VR Locomotion — allowing movement through a Virtual Reality environment — by tracking real walking parameters.

The CybSDK plugin connects to the Cyberith Virtualizer and uses the following four data streams to move the unit character in the VR environment according to the user’s real movement:

  • Body Orientation: Orientation of the user in the Virtualizer.
  • Movement Direction: Direction of movement relative to the user’s orientation.
  • Movement Speed: Speed in meters per second.
  • Hip Height: Height of the user’s hips in centimeters.

Integrating locomotion into a new Unity project is as easy as dragging and dropping the CybSDK prefab into a scene. To integrate the CybSDK into a complete, complex project you can swap out or add needed components of your Unity character or even modify code according to your needs.

— Haptic:

The haptic functionality allows to provide additional feedback using the integrated vibration unit. This feedback can range from explosion vibrations, stair feedback, dramatic effects, all the way to letting the user know he did something incorrectly.

The CybSDK plugin uses a system of Emitters and Listeners to simplify integration into your projects. Optionally, these components can be overridden to fit every project’s needs. These components can be fully configured to deliver a variety of haptic effects.

Screenshot of a Unity Project using the haptic functionality of the CybSDK

To use this haptic functionality, you can attach the HapticListener component to your character and configure a HapticEmitter for every object you want to interact with the system. You can set duration, range and intensity of the vibration for every object separately to achieve a multitude of effects.

— Debugging:

Debugging is a crucial feature for development processes. Thus, the CybSDK plugin features a variety of virtual devices that can be used during development. This allows to debug an application even in case no Virtualizer hardware is available.

The Virtualizer Device Controller automatically detects valid hardware settings and activates an Xbox 360 Gamepad or Keyboard input, in case no Virtualizer is detected. Optionally, you can manually override the device selection to test devices as you see fit.

Device Controller of the CybSKD in Unity

To simplify this debugging process, all necessary settings are available in the Unity Object Inspector and can be selected, or simply left to automatic mode.

— Further Information on the CybSDK for Unity:

For further explanations in how to integrate the Unity plugin into your application, download our Integration Guide (pdf download).

Integrating the CybSDK into Unreal Engine 4

Similarly to the Unity plugin explained above, we are also offering an Unreal Engine 4 plugin. This UE 4 plugin works analogously to the Unity plugin described above. We do lay out the functions below, but please be aware that the following paragraph is extremely similar to the previous one.

The plugin described in this paragraph simplifies the integration of Cyberith Virtualizer products into Unreal Engine projects. The Plugin uses the Native C++ CybSDK.

In addition to libraries, Unreal Engine components and blueprints, this package also contains a sample map with the Unreal Engine plugin integrated. This sample map shows the functionalities of the plugin.

— Overview:

Screenshot of Unreal Engine with the Cyberith Virtualizer SDK implemented

Similarly to the Unity plugin, the Cyberith Unreal Engine plugin has been designed with compatibility in mind. It is split into multiple inter-compatible components that you can use, alter or swap out completely:

  • VirtInputDevice Module: This input module has full authority over the Virtualizer. Here, the device is selected, a connection established and managed.
  • BP_VirtPlayerController: This script moves the player character according to the Virtualizer input. It uses a standard Unreal Engine CharacterController component.
  • BP_VirtHapticListener: This script receives haptic feedback emitted by all active HapticEmitters in a defined range. This component also activates the Virtualizers haptic vibration unit.
  • BP_VirtHapticEmitter: This script emits haptic feedback in a specific radius around it, to be received by a HapticListener.

— Locomotion:

The main functionality of the Cyberith Virtualizer is VR Locomotion — allowing movement through a Virtual Reality environment — by tracking real walking parameters.

The CybSDK plugin connects to the Cyberith Virtualizer and uses the following four data streams to move the unit character in the VR environment according to the user’s real walking movements.

  • Body Orientation: Orientation of the user in the Virtualizer.
  • Movement Direction: Direction of movement relative to the user’s orientation.
  • Movement Speed: Speed in meters per second.
  • Hip Height: Height of the user’s hip in centimeters.

Integrating locomotion into a new Unreal Engine project is as easy as dragging and dropping the BP_VirtPawn blueprint into a scene. To integrate the CybSDK into a complete, complex project you can swap out or add needed components of your Unreal Engine character or even modify code according to your needs.

— Haptic:

The haptic functionality allows to provide additional feedback using the integrated vibration unit. This feedback can range from explosion vibrations, stair feedback, dramatic effects, all the way to letting the user know he did something incorrectly.

The CybSDK plugin uses a system of Emitters and Listeners to simplify integration into your projects. Optionally, these components but can be overridden to fit every project’s needs. These components can be fully configured to deliver a variety of haptic effects.

Screenshot of Unreal Engine, symbolizing the Haptic Functionality of the Cyberith SDK

To use this haptic functionality, you can attach the HapticListener component to your character and configure a HapticEmitter for every object you want to interact with the system. You can set duration, range and intensity of the vibration for every object separately to achieve a multitude of effects.

— Debugging:

Debugging is a crucial feature for development processes. Thus, the CybSDK Plugin features a variety of virtual devices that can be used during development. This allows to debug an application even in case no Virtualizer hardware is available.

The Virtualizer Device Controller automatically detects valid hardware settings and activates an Xbox 360 Gamepad of Keyboard input in case no Virtualizer is detected. Optionally, you can manually override the device selection to test devices as you see fit.

Virtualizer Device Controller of the CybSDK in Unreal Engine 4

To simplify this process, all necessary settings are available in the Unreal Engine Project Settings and can be selected, or simply left to automatic mode.

— Further Information on the CybSDK for Unreal Engine 4:

For further explanations in how to integrate the Unreal Engine plugin into your application, download our Integration Guide (pdf download).

Requests & Enquiries about the SDK for the Cyberith Virtualizer

The CybSDK is available to all customers of the Virtualizer Research & Development Kit as well as to those of the Virtualizer ELITE 2.

If you want to use our Virtualizer products and the according SDK for your development projects, or if you have further questions about the Cyberith SDK, please feel free to contact us at any time:

--

--

Cyberith
Cyberith Virtualizer VR Treadmills

Creators of the Virtualizer VR Treadmills for locomotion in virtual reality environments.