Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic Razer Hydra Plugin

    Razer Hydra Plugin

    An event driven plugin for the Razer Hydra. Check out the video for a quick tutorial.

    Since version 0.8, the plugin works through both Unreal Engine Motion Controller and Input Mapping abstraction as well as through a convenience component for hydra specific events and functions.

    Forward me your suggestions and let me know if this helped you!

    Only supported in Windows 64 & 32 Platform.

    Download Latest


    Read the Github readme for the latest documentation,

    Older 4.11+
    https://github.com/getnamo/hydra-ue4/releases

    Older
    v0.8.3 for UE 4.10
    v0.8.2 for UE 4.9
    v0.7.8 for UE 4.8
    v0.7.7 for UE 4.7
    v0.7.6 for UE 4.6
    v0.7.4 for UE 4.5
    v0.6.5 for UE 4.4
    v0.6.3 for UE 4.3
    v0.5.3 for UE 4.2
    v0.5.2 for UE 4.1

    Resources
    Github - Main Plugin Source and Documentation
    Sixense UE4 Plugin thread


    Installation (0.8 or newer)
    1. Download plugin
    2. Create new or choose project.
    3. Browse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})
    4. Copy Plugins folders into your Project root.
    5. Restart the Editor and open your project again.
    6. (Optional) Select Window->Plugins. Click on Installed and you should see a category called Input and a plugin called Hydra Plugin now available. It should be automatically enabled, if not, Select Enabled. The Editor will warn you to restart, click restart.

    Use Cases
    Input mapping is recommended for Joystick and Button mapping, use Motion Controller Components for x,y,z


    How to use it - Motion Controllers
    Please refer to the Motion Controller Component Setup unreal documentation as this setup is hardware agnostic. Since 0.9 a basic motion controller setup should look like this:



    Where visible static meshes are parented to the motion controllers which are in turn parented to a chosen offset, forward by 40cm from the camera in this particular example.

    No hydra specific component is required, tracking is handled internally and passed to the agnostic motion controller components and the input mapping system. Tracking should defer to other motion controllers if unplugged or docked.

    Input Mapping

    You can use either the Motion Controller input mapping (IM) events



    or hydra specific ones




    Other Resources:

    Video Series
    2-part tutorial series by Weevilman, based on the 0.8.2 for UE 4.9.

    Part 1


    Part 2


    Changelist

    0.9.5
    -UE4.15 update

    0.9.4
    -fixed derived values (acceleration, velocity and angular velocity)

    0.9.3
    -fix unplugged event not triggering

    0.9.2
    -No hydra specific components required for full tracking. If you're using Input Mapping + Motion Controller abstraction, just follow UE hardware abstracted documentation. This is the recommended method of using the plugin.
    -Optional HydraControllerComponent used to receive 0.8 style hydra specific events and poll for additional data
    -Hydra data now encapsulated as a HydraControllerData UStruct and emitted in the custom events
    -Historical data removed, use a generalize structure instead
    -C++ method should now access data in the same form as blueprints.
    -4.14 update
    -Input mapping keys renamed to fit closer to how Motion Controller keys are named.
    -documentation update for new API

    0.8.9
    -Merged compile fixes for 4.12
    -Updated binaries

    0.8.8
    -Changed to git flow, look for latest downloads under https://github.com/getnamo/hydra-ue4/releases
    -Uses send controller event for late update only not tick
    -added docs url and changed load order
    -added world scaling support from vr-editor
    -dependencies moved to saner locations

    0.8.3
    -Updated to 4.10
    -Experimental branch merged into master

    E0.8.2
    -Added ButtonPressed and ButtonReleased events to HydraPluginComponent
    -Cleaned up code a bit
    -Added ability for the plugin to auto-hide your attached MeshComponents,
    see readme for details.

    E0.8.1
    -Added HydraPluginComponent with Blueprint Assignable Multi-Cast
    Delegates. Click the component and click + to add an event subscription
    to the current blueprint
    -Plugin components and their events are now multi-cast add them wherever
    you want
    -Added input mapping events for each controller dock/undock
    -Fixed PIE crash, seems stable now
    -Removed Binaries folder, just drag and drop Plugins. Packaging does
    copy the require dll, but may not run.

    E0.8.0
    -Update to 4.9
    -Adds support for UE 4.9 hardware agnostic Motion Controller interface,
    both for Input Mapping and Left/Right hand 1:1 motion.
    -This commit removes past compatibility, wait for stable release if you
    wish to have both.

    0.7.8
    -Update to 4.8

    0.7.7
    -Update to 4.7
    -Fixed a memory leak.

    0.7.6
    -HydraPlayerController will no longer cause a crash when used in project.

    0.7.5
    -contains all compile fixes and prebuilt binary for UE4.6

    0.7.4
    -Changed AnyButtonPressed event into ButtonPressed(enum
    HydraControllerButton) and ButtonReleased(enum HydraControllerButton)
    allowing for a single event to handle all buttons if desired.
    -Reduced controller lag by 1 frame, this was introduced in 0.7 due to a
    bug from blueprint controller class extension

    0.7.3
    -Minor code consistency fix
    -Added white listing of only supported (windows) platforms

    0.7.2
    -fixed a crash caused by not having your interface set. This will not
    longer cause your session to crash, but instead emit log and on-screen
    errors.

    0.7.1
    -Synced folder layout with other plugins. To install you now need to copy both Binaries and Plugins
    -Added support for 32bit shipping build, for either packaged or shipping build copy Binaries after packaging has been complete.

    0.7
    -Updated to UE4.5
    -New Component based system using interfaces; now able to extend any
    blueprint class to have a Hydra component and receive the HydraInterface
    events! See readme or unreal thread for details.
    -All events now emit a UHydraSingleController, allowing for easy probe
    of additional data at the event state.
    -Some compatibility may be broken, but old style C++ extension is still
    possible using the old delegate (still retained). New style C++ plugin
    extension leads to less code, see convenience actor for details.

    0.6.5
    -Fixed C++ input mapping, if you're extending your own project class with the hydra delegate, make sure to copy HydraDelegate.cpp found in the plugin source into your project source; this will allow the project to compile for the editor. Remove when compiling for shipping to stop duplicate file error caused by compiler collapsing the dll into single exe.

    0.6.4
    -Updated to UE4.4

    0.6.3
    -Added shipping build convenience folder, package and copy the slimmed down Plugins folder to enable the plugin.
    -See shipping post, github, or wiki for shipping instructions and troubleshooting.

    0.6.2
    -Added integrated angular velocity support, updated data, functions, and events to reflect
    -C++ class extension needs less filler code, see HydraPluginActor/HydraPlayerController for examples of updated syntax.
    -Moved core functionality from the delegate into the plugin
    -Historical Data now a pointer to plugin data instead of holding own copy of data.
    -Removed Slate dependency from Delegate
    -Removed IHydraPlugin.h dependency from HydraDelegate sub-classes
    -HydraPluginActor is now added to the input chain if its used by default, allowing it to receive input mapping events.
    -Bug Fixes


    Older Resources
    -v0.7 Quick Setup and How to Use.
    -Wiki - Currently Outdated, use github for documentation
    -Plugin v0.5 video, still relevant regarding general setup, use with blueprint convenience actors, and C++ class extension.
    Last edited by getnamo; 08-19-2017, 12:40 AM.

  • replied
    Update to 1.0.0
    - Compile fixes for 4.17
    - Enabled by default
    - API stable, graduated to 1.0

    This marks the first of my plugins to reach what I consider 1.0 stability . Get the latest build for 4.17 at: https://github.com/getnamo/hydra-ue4/releases

    Leave a comment:


  • replied
    Originally posted by Getnamo Checkout the latest release, it should all just work out of the box. If you have any question first check the documentation on the [URL="https://github.com/getnamo/hydra-ue4"
    github repository[/URL] and then if things are still unclear, pop a message here.
    Thanks Getnamo, I'll have a look!

    Leave a comment:


  • replied
    Originally posted by getnamo View Post
    Glad you like the rewrite Looks like I missed the derived values. I thought of getting rid of them in this rewrite, but since you seem to find them useful I added back the links and updated with a 0.9.4 release with the fix

    Update to 0.9.4
    -fix derived values (acceleration, velocity and angular velocity)

    grab the latest release to get the fix. Let me know if anything else is broken
    That does the trick ! I used the acceleration values to create an input axis to drive the opening of drawers and doors on a project I'm working on.
    Thank you ! Now I just have to get the same data out of Epic's MotionController setup >.<

    **Update**
    I managed to figure it out using the MotionController setup as well. I used the WorldLocation of the MotionController's StaticMesh and ran that through GetPhysicsLinearVelocityAtPoint, then I normalized the resulting vector and multiplied it by WorldDeltaSeconds. Then I broke the vector and for my needs I multiplied the Y Axis by a modifier (10 in my case) and then by -1 to invert it. Did all this in a function that gets called on tick, probably not the most efficient way but I don't see any slowdown for my purposes
    Last edited by MrNexy; 12-23-2016, 07:50 PM.

    Leave a comment:


  • replied
    Originally posted by MrNexy View Post
    Hey there [MENTION=548]getnamo[/MENTION] !

    Wow this re-write really simplified things
    I'm facing something of a wall with getting the acceleration of each hydra controller.
    I break the controller struct coming out of the controller moved event, position and rotation work well enough but the acceleration and velocity return 0,0,0.
    Any thoughts on this ?

    Kind Regards
    MrNexy
    Glad you like the rewrite Looks like I missed the derived values. I thought of getting rid of them in this rewrite, but since you seem to find them useful I added back the links and updated with a 0.9.4 release with the fix

    Update to 0.9.4
    -fix derived values (acceleration, velocity and angular velocity)

    grab the latest release to get the fix. Let me know if anything else is broken

    Leave a comment:


  • replied
    Hey there [MENTION=548]getnamo[/MENTION] !

    Wow this re-write really simplified things
    I'm facing something of a wall with getting the acceleration of each hydra controller.
    I break the controller struct coming out of the controller moved event, position and rotation work well enough but the acceleration and velocity return 0,0,0.
    Any thoughts on this ?

    Kind Regards
    MrNexy

    Leave a comment:


  • replied
    Originally posted by getnamo View Post
    Update to 0.9.3
    -No hydra specific components required for full tracking. If you're using Input Mapping + Motion Controller abstraction, just follow UE hardware abstracted documentation. This is the recommended method of using the plugin.
    -Optional HydraControllerComponent used to receive 0.8 style hydra specific events and poll for additional data
    -Hydra data now encapsulated as a HydraControllerData UStruct and emitted in the custom events
    -Historical data removed, use a generalize structure instead
    -C++ method should now access data in the same form as blueprints.
    -Input mapping keys renamed to fit closer to how Motion Controller keys are named.
    -4.14 update
    -documentation update for new API
    -fix unplugged event not triggering

    Grab the latest at the usual https://github.com/getnamo/hydra-ue4/releases.
    Refer to the main github repository for up to date documentation!




    You prompted me to finish my modern rewrite and publish it, checkout the latest release . It simplifies things a bit more but will have some breaking changes if you relied on the hydra component. Now from 0.9, you can completely forget about hydra specific components/etc and just use Motion Controller + Input mapping system to do everything. Refer to the main repo documentation to see the api changes.

    Enjoy



    Checkout the latest release, it should all just work out of the box. If you have any question first check the documentation on the github repository and then if things are still unclear, pop a message here.
    Getnamo, you are a life saver! Thank you !

    Leave a comment:


  • replied
    Update to 0.9.3
    -No hydra specific components required for full tracking. If you're using Input Mapping + Motion Controller abstraction, just follow UE hardware abstracted documentation. This is the recommended method of using the plugin.
    -Optional HydraControllerComponent used to receive 0.8 style hydra specific events and poll for additional data
    -Hydra data now encapsulated as a HydraControllerData UStruct and emitted in the custom events
    -Historical data removed, use a generalize structure instead
    -C++ method should now access data in the same form as blueprints.
    -Input mapping keys renamed to fit closer to how Motion Controller keys are named.
    -4.14 update
    -documentation update for new API
    -fix unplugged event not triggering

    Grab the latest at the usual https://github.com/getnamo/hydra-ue4/releases.
    Refer to the main github repository for up to date documentation!


    Originally posted by MrNexy View Post
    Hey Getnamo !

    Do you know when there'll be a 4.14 update for the plugin ?

    Thank you !
    You prompted me to finish my modern rewrite and publish it, checkout the latest release . It simplifies things a bit more but will have some breaking changes if you relied on the hydra component. Now from 0.9, you can completely forget about hydra specific components/etc and just use Motion Controller + Input mapping system to do everything. Refer to the main repo documentation to see the api changes.

    Enjoy

    Originally posted by olistreet View Post
    Hi, has anybody got the chance to use the new VR template in 4.13 with the latest hydra plugin? Is there anything in especific that I might be missing in order to get it working, I can get the print screen function to work on hydracontrollermoved but I get no response when using the calibrate functions. When I start the hydras are in floor level, 1-1 translation but at floor level.

    I haven't tried to make a new blank project and start from the scratch because the new VR template is quite good. but maybe If I get the hydras working on a blank new project, somehow I can import all the blueprints from the VR template to the new project.

    Thanks guys!!
    Checkout the latest release, it should all just work out of the box. If you have any question first check the documentation on the github repository and then if things are still unclear, pop a message here.
    Last edited by getnamo; 12-22-2016, 12:53 PM.

    Leave a comment:


  • replied
    Hey Getnamo !

    Do you know when there'll be a 4.14 update for the plugin ?

    Thank you !

    Leave a comment:


  • replied
    Hi, has anybody got the chance to use the new VR template in 4.13 with the latest hydra plugin? Is there anything in especific that I might be missing in order to get it working, I can get the print screen function to work on hydracontrollermoved but I get no response when using the calibrate functions. When I start the hydras are in floor level, 1-1 translation but at floor level.

    I haven't tried to make a new blank project and start from the scratch because the new VR template is quite good. but maybe If I get the hydras working on a blank new project, somehow I can import all the blueprints from the VR template to the new project.

    Thanks guys!!

    Leave a comment:


  • replied
    Hi! Getnamo, thanks for all the effort, I'm dying to get my hands on the touch controllers! In the meantime I follow your work, I'm really just learning but with the new 4.13 update that you just uploaded I'm having troubles with the hydra movement.

    I've put the hydraplugin in the BP_MotionController Scene in the new VR Template, in the MotionController Map, and I get hand movement, but the hand meshes are at floor level, and if I modify the values in the transformation tab in details to match the real world position of the hydra base station, I get a bad translation of the hand movement, Also Calibrate or SetBaseOffset functions seems to do nothing when I call them in the Graphic Event for the BP_MotionController blueprint. Any Ideas?

    Greetings!

    Leave a comment:


  • replied
    Brilliant, thank you!

    Leave a comment:


  • replied
    Originally posted by sandmeister View Post
    Hi Getnamo, were you able to push an update for 4.13?

    Thanks kindly!
    Originally posted by ipas View Post
    Sorry for my very late response. Yeah.. the Hydra needs to be plugged in for the Vive motioncontrollers to work. When the plugin is enabled and the hydra is not plugged in, the position of motioncontrollers stays are 0.0.0. Great that this is fixed btw !
    Update to 4.13
    -Compile fixes for 4.13
    -Attempt at 0,0,0 fix for vive/hydra

    let me know if the fix works!

    grab it at the usual: https://github.com/getnamo/hydra-ue4/releases

    Leave a comment:


  • replied
    Hi Getnamo, were you able to push an update for 4.13?

    Thanks kindly!

    Leave a comment:


  • replied
    Sorry for my very late response. Yeah.. the Hydra needs to be plugged in for the Vive motioncontrollers to work. When the plugin is enabled and the hydra is not plugged in, the position of motioncontrollers stays are 0.0.0. Great that this is fixed btw !

    Leave a comment:

Working...
X