Git Product home page Git Product logo

haptico's Introduction

The Haptico Plugin

The Haptico Plugin allows you to use three and six degree of freedom haptic devices directly in the Unreal Engine. You can easily access your haptic device from Blueprint or C++ and retrieve the position, rotation, linear velocity, angular velocity and button clicks from the device and apply forces and torques to the device. This Plugin was tested with the PHANToM Omni from Sensable but should work with all of the following haptic devices that the internally used library CHAI3D supports: delta.x, omega.x, sigma.x, Novint Falcon, Phantom Omni, Touch 3D, Razer Hydra.

Instalation

  • Put the Haptico Folder into the Plugins folder in your project directory. If you don't have the folder, create it.

  • If you want to use C++, add the following lines to your <your_project_name>.Build.cs :

    	PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Haptico"});
        PrivateDependencyModuleNames.AddRange(new string[] { "Haptico" });
        PrivateIncludePathModuleNames.AddRange(new string[] { "Haptico" });
        PublicIncludePathModuleNames.AddRange(new string[] { "Haptico" });
  • Put your haptic device specific DLL into the projects Binaries/Win64 folder next to the other DLL's. If you don't have one, create Binarries/Win64/ in your project directory.

  • Make sure that the plugin is enabled in the editor under Edit->Plugins.

How to use

In the editor in the Modes tab search for a class named Haptic Manager and place it in your scene. Now you can open your Blueprint and search for and use the following functions:

  • Set Force to Apply
  • Set Torque to Apply
  • Get Haptic Device Position (in Device Coordinates)
  • Get Haptic Device Position in Unreal Coordinates
  • Get Haptic Device Rotation (in Device Rotation Matrix)
  • Get Haptic Device Rotation as Unreal Rotator
  • Get Haptic Device Linear Velocity
  • Get Haptic Device Angular Velocity

To react to button clicks, You can catch the Events Button1Clicked and Button2Clicked.

You can access the same functions from C++ from the AHapticManager class.

If you need smooth haptic force feedback you can hook to the haptic thread that runs at nearly 1000Hz by binding to the OnHapticTick Delegate to do your force calculation on the haptic thread.

Example

You can find an example project that includes the plugin in the Example Folder. Drag the Haptico plugin into the project's Plugins folder and start the example.

haptico's People

Contributors

sindemcos avatar

Watchers

burak cizmeci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.