Tutorial

2024:5

Darshitha




Integrating Bhpatics 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.

  • Unity 2019.4 or later
  • bhaptics Player SDK
  • bhaptics hardware (vest, gloves, etc.)
  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.
  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
  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.

To send haptic feedback call:

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

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.