Table of Contents

Tutorial

2024:5

Darshitha




Integrating Bhpatics into Unity


How to Integrate bhaptics SDK into Unity

Below are steps on how to install and integrate the bhaptics tactile vibration SDK into a Unity project. This allows sending tactile feedback to bhaptics devices.

Requirements

Install the bhaptics SDK

  1. Download the latest bhaptics Player SDK from bhaptics.com.
  2. Extract the .zip file.
  3. Import the bhaptics SDK package into your Unity project.
  4. Assets > Import Package > Custom Package
  5. Select everything in the package and import.

Configure the Project

  1. Navigate to Edit > Project Settings > Player
  2. Under the XR Settings:
  3. Check Virtual Reality Supported
  4. Add bhaptics to the Virtual Reality SDKs list

(Optional) Under Publishing Settings add:

  1. Bhaptics to the list of target platforms
  2. Windows to the list of target SDKs

Add bhaptics Objects

  1. Create a new BhapticsManager object (menu: bhaptics > Bhaptics Manager)
  2. Create a new BhapticsReceiver object (menu: bhaptics > Bhaptics Receiver)
  3. Position both objects under a manager object in the hierarchy.

Send Haptic Feedback

To send haptic feedback call:

      BhapticsManager.instance.SubmitRegistered("HapticKey", position, intensity); 

Conclusion

The bhaptics SDK is now integrated into your Unity project. You can send haptic feedback to bhaptics devices by calling the SubmitRegistered() method. Refer to the bhaptics documentation for more advanced usage.