Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

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

  • 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.
    Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

  • #2
    Wow, thanks for this! Sixense is planning STEM (and Hydra backward compatible) UE4 support, but not til post STEM launch. This'll be great in the meantime to get started working on ideas.

    Source

    All I can say at this point is that we are currently working on native integration into UE4. I can't promise that it'll be available prior to the STEM system launch, but it will of course be backwards compatible with the Razer Hydra.
    Edit: Looks like you've posted in that very thread. Congrats on figuring it out!
    Last edited by Rirath; 04-23-2014, 07:12 PM.

    Comment


    • #3
      Wanted to make one more post to say I just had a chance to watch the tutorial - it was excellent! Thank you for the through explanation and the blueprint (and C++) examples.

      Much appreciated.

      Comment


      • #4
        Hey Getnamo,

        I would like to say awesome work for figuring this out.

        Cannot wait to get started working with this.

        Comment


        • #5
          Thanks for making / posting this! nice work! glad we don't have to wait for Sixense to implement something.

          Comment


          • #6
            Other than the few crashes this works an absolute charm! Well done I think we all owe you a beer!

            A nice straight forward tutorial too.

            Comment


            • #7
              I love it so far, the code is very neatly written and integrates with everything the proper way.

              List of Black Fang Technologies' projects -> https://forums.unrealengine.com/show...ogies-Projects

              Comment


              • #8
                Plugin needs an update for 4.1 I guess now it says it is not compatible.

                Comment


                • #9
                  Originally posted by AntonieB View Post
                  Plugin needs an update for 4.1 I guess now it says it is not compatible.
                  I'll have a look and recompile.

                  NB: You do have the full source to the plugin
                  Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                  Comment


                  • #10
                    Originally posted by getnamo View Post
                    I'll have a look and recompile.

                    NB: You do have the full source to the plugin
                    Will look into the source / compiling it myself if only for educational purposes.

                    Thanks again for your work already.

                    Comment


                    • #11
                      Plugin Updated for 4.1 with small code consistency and comment changes and a new readme.
                      Download V0.5.1

                      If you want to recompile the earlier 0.5 in your project instead follow these guidelines from epic:
                      - Upgrading C++ code projects
                      * You’ll need to recompile the C++ project for the new version of Unreal Engine
                      * Locate the .uproject file in your game’s folder, and right click on it. (on Mac, you can also Command + Click)
                      * Select Switch Unreal Engine Version -> 4.1 (on Mac, this is in a Services menu)
                      * Right click to generate new C++ project files, then recompile your game normally.
                      * Note: Some C++ APIs may have changed between versions, which can cause compile errors. Read the API Changes section for more information.
                      Last edited by getnamo; 04-24-2014, 07:46 PM.
                      Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                      Comment


                      • #12
                        Fantastic work. Thank you so much. Is it possible to use the joysticks and buttons on the Hydra with the input and axis mappings in the engine?
                        Stygian Abyss Demo VR Remake

                        http://mrob76u.wordpress.com/

                        Comment


                        • #13
                          Originally posted by Mrob76u View Post
                          Fantastic work. Thank you so much. Is it possible to use the joysticks and buttons on the Hydra with the input and axis mappings in the engine?
                          I haven't bound this myself but it should be doable using the guidelines outlined in https://www.unrealengine.com/blog/in...appings-in-ue4

                          Not 100% sure on the how part as of yet as the standard for custom input is not fully documented. This is why the plugin provides maximum flexibility as you can extend your own class to handle inputs and therefore place it where you feel it is most relevant for your project.
                          Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                          Comment


                          • #14
                            Really great work, very excited to see people integrating technologies like this in to UE4.

                            Originally posted by Mrob76u View Post
                            Is it possible to use the joysticks and buttons on the Hydra with the input and axis mappings in the engine?
                            This was one of the things I was wondering about as well. If you're interested in extending the plugin to implement the input system integration I'd be happy to help point you in the right directions.

                            One of the intentions of the way that FKey references inputs by FName is that adding new inputs in a plugin should be straightforward, however, it does not have a plugin based consumer of the API that I'm aware of yet.

                            The first step would be to call EKeys::AddKey for each of the new keys, probably as part of your module initialization. Then in your module you would need a tickable object, potentially using FTickableGameObject which pumps calls to FSlateApplication. Probably OnControllerAnalog, OnControllerButtonPressed/Released, and possibly OnMotionDetected, though I'm imagining there is some work that needs to be thought out about how to make the motion functions work with the two controllers.

                            Comment


                            • #15
                              Originally posted by Marc Audy View Post
                              Really great work, very excited to see people integrating technologies like this in to UE4.



                              This was one of the things I was wondering about as well. If you're interested in extending the plugin to implement the input system integration I'd be happy to help point you in the right directions.

                              One of the intentions of the way that FKey references inputs by FName is that adding new inputs in a plugin should be straightforward, however, it does not have a plugin based consumer of the API that I'm aware of yet.

                              The first step would be to call EKeys::AddKey for each of the new keys, probably as part of your module initialization. Then in your module you would need a tickable object, potentially using FTickableGameObject which pumps calls to FSlateApplication. Probably OnControllerAnalog, OnControllerButtonPressed/Released, and possibly OnMotionDetected, though I'm imagining there is some work that needs to be thought out about how to make the motion functions work with the two controllers.
                              Interesting, I'll definitely ask you some questions on this after looking at it sometime later this week. The concept is clear, but its always the devil in the details. I remember looking at this earlier, but without success in finding direct examples (all native keys and gamepad binds seem to be buried in the engine).
                              Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                              Comment

                              Working...
                              X