An Unofficial Razer Hydra plugin for the Unreal Engine 4.
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.
- Download Latest Release
- Create new or choose project.
- Browse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})
- Copy Plugins folder into your Project root.
- Enable the plugin via Edit->Plugins. Scroll down to Project->Input Devices. Click Enabled.
- Restart the Editor and open your project again. Plugin is now ready to use.
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.
You can use either the Motion Controller input mapping (IM) events
or hydra specific ones
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.
The origin of tracking is the hydra base station.
For input mapping purposes Hydra start == Face Button 5 Hydra Joystick Click == Face Button 6
If you want to calibrate or do complex hydra specific things, just add a hydra controller component.
Component are multicast and their events are as well so place them anywhere in multiples if you want to. They are also where you would poll for latest data for gesture recognition/etc.
How about events? Now there are no more interfaces to deal with, instead you click on your hydra plugin component and click the green + to add the event from the details pane. This should feel familiar as these are the same blueprint assignable multicast delegates that PrimitiveComponents use for collision checks (e.g. OnBeginOverlap)
E.g. draw a debug box for each hydra from a base offset scene component
e.g. verbose log of button presses/releases. Notice that you can break additional information from the controller data structure.
e.g. a verbose log of joystick movement
Called when you plug in or unplug the controller from the system usb.
the same type of events exist for docking.
Used to calculated 1:1 offset for your controllers. To calibrate you simply call Calibrate or SetBaseOffset on your component.
Calibrate recalibrates the origin as coming from the centroid of your two hydras + the offset. In its default settings it should work as a good T-pose to shoulder midpoint.
If you want to do your own calibration, just come up with a good position offset and set it here, all values onward will maintain this calibration, even between PIE sessions.
When you're ready to ship, just package the game it should all work out of the box.
You run your packaged project and you get the following errors
Error:
Your project runtime also continues working, but your hydra does not respond.
Fix: This means that you have no code added to your project, the project needs code to run a plugin. Add any code (e.g. new pawn that doesn't do anything extra) and compile to fix.
Error:
Also you search your log file and find
Fix: This error means the sixense dll file is missing.
Plugin made by Getnamo. Point all questions to the main discussion thread.
The Sixense SDK is licensed under Sixense EULA.
Anything not covered by Sixense EULA and Unreal Engine EULA in Hydra UE4 Plugin provided under MIT license. Do anything you want just retain the notice.