Skip to content
OpenHaptics Native plugin for Unity3D
C++ C# CMake
Branch: master
Clone or download
Latest commit 1518fbf Aug 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMakeLists.txt Copy to Unity Folder Plugins Jul 5, 2018
Haptic.cs minor fix because this was previously used in Joutai Aug 13, 2018
LICENSE Initial commit May 13, 2018
README.md Update README.md Aug 15, 2019
Touchy.cpp changed wording Aug 16, 2019
Touchy.dll Make dll loadable for Unity Aug 13, 2018
vector_math.h haptic sphere test May 13, 2018

README.md

Touchy Logo

A Unity3D plugin for Phantom Omni and 3DS Touch/TouchX written in C/C++

Tested With:

  • Sensable Phantom OmniSensable Phantom Omni (IEEE 1394 Interface)
  • 3D Systems Touch3DSystems Touch

Currently Only supports Windows though it should be straightforward to port it to GNU/Linux.

This is a wrapper for OpenHaptics geared towards Unity3D. This plugin is under development.

Supports:

  • Sphere rendering
  • Gravity well rendering

Build requirements:

  • Cmake (unless you want to make a project manually)
  • OpenHaptics by 3DS (which, ironically, is closed source). The build system will try to locate the header and library files under $(OH_SDK_BASE) Environment variable in Windows.
  • (Optional) Set Environment Variable Unity_Plugins_Folder and uncomment the bottom of CMakeLists.txt to make the build system automatically copy the built library to your Assets/Plugins folder.

To use in Unity 3D:

  • Copy the built plugin to your Assets/Plugins folder (or make the build system automatically do it for you - see CMakelists.txt)
  • Create a new c# script that inherits from :Haptic
  • Implement OnStylusButtonDown method
  • (Optional) use stopCallback and startSphereCallback(...) to add a sphere and test your haptic device.
  • Press Play

Customize

  • Both the haptic plugin source and the Unity3D haptic class source are self-explanatory.
  • Due to Unity3D/Mono limitations, if you make changes to the C/C++ library you must completely close and restart unity to load the new build of the .dll.
  • Feel free to open an issue with feature requests

Credits

This project was supported by the German Research Foundation in TRR-169 Cross-Modal Learning and by the National Science Foundation of China (NSFC). https://www.crossmodal-learning.org/
Crossmodal Learning LogoDFG Logo

You can’t perform that action at this time.