The Interhaptics SDK is a powerful tool for developers who want to add haptic feedback to their applications. This guide provides step-by-step instructions on how to integrate the Interhaptics SDK into your Unreal Engine project by providing a basic integration example.
PrerequisitesTo proceed with the integration process, you need to have a basic understanding of Unreal Engine and have it installed on your computer. Additionally, you should have the Interhaptics SDK downloaded or cloned from the official repository.
Step 1: Add the Interhaptics SDK filesCreate a Plugins folder: Navigate to your project folder and create a “Plugins” folder at the root level (YourProject/Plugins). Go inside the Plugins folder and clone the Interhaptics SDK repository, or alternatively download the package from https://github.com/Interhaptics/UnrealEngine_CoreSDK/archive/refs/heads/master.zip and extract it in the Plugins folder.
Step 2: Build the Interhaptics modulesOpen your Unreal Engine project, and the engine will prompt you to rebuild the Interhaptics modules included in the plugin.
Step 3: Enable the Interhaptics pluginOpen the Plugins section, and make sure the Interhaptics plugin is enabled under Project > Other.
Step 4: Add the Haptic Manager classIn the Content Browser, go to Settings and select “Show Plugins content.” Then, navigate to Interhaptics C++ class > Interhaptics > Public, and get the Haptic Manager. Drag the Haptic Manager into your viewport.
Step 5: Add a Haptic Source BlueprintCreate a new Blueprint with the Haptic Source type, and use the following features:
- General: Assign a Haptic Effect to the object to be played. The Interhaptics Unreal SDK contains already a library of haptic effects which can be found in the package.
- Blueprint event graph: Set Targets: allows you to set the targets of the source between Left, Right, Both, or None.
- Blueprint event graph: Play: starts all haptic events related to the haptic source.
- Blueprint event graph: Stop: stops all haptic events related to the haptic source.