Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

HydraDeck - Hydra motion controls (Updated)

Teddy0kTeddy0k Posts: 205
Hiro Protagonist
edited June 2015 in Unity Development
Hello folks,

I've come up with a novel controls system using the Razer Hydra and made a few demos with it;


I've now ported this same code to Unity! If you'd like to add this to your project, you can download the scripts here;
https://drive.google.com/file/d/0B1KRnJKwYT-0VllyNGlRQkdHeUE/edit?usp=sharing

To set it up you only need to;

1) Install the Sixsense unity plugin (http://u3d.as/content/sixense-studios/sixense-unity-plug-in/4pA)
2) Add the SixenseInput prefab to your scene
2) Install the HydraDeck_Unity.unitypackage
3) Add the Hydradeck\HydraDeckPlayerController prefab to your scene
4) (optional) add the Hydradeck\HydraDeck Hand prefab to your scene

Additionally, if you'd like to add a Hand to interact with the world, add the "HydraDeck\HydraDeck Hand" prefab
«1

Comments

  • CaineCaine Posts: 208
    I was asking about this in your collaboration thread, didn't think you'd bother - thanks! Will definitely check this out :)
  • You rock!
  • ReverendKyleReverendKyle Posts: 294
    Hiro Protagonist
    Thank you sooooo much for sharing this!


    :D:D:D:D:D
    Have you listened to the Rev VR Podcast yet?

    Listen and subscribe through iTunes or through Stitcher

    http://www.reverendkyle.com
  • Amazing! Thank you for releasing this! Now, if you could just release a plugin that allows us high-five you via the internet, many of us would be obliged to do so.

    Cheers!
  • Hey Teddy,

    Thanks for this great Asset and your great work in general. I love Cover Shooter. HydraDeck really makes the difference in immersion. Can't wait to get it working with my project. https://shroudoftheavatar.com/forum/index.php?threads/dungeon-kit-explorer-a-fan-made-playable-demo.2919/

    When I add the HydraDeckCamera script, I find that my Avatar is raised something like 2 meters above the ground.

    Here is my GameObject Tree:
    PlayerControllerHAL
    +FirstPersonController
    ++Graphics
    ++Main Camera
    +OVRPlayerController
    ++ForwardDirection
    ++OVRCameraController
    +++CameraLeft
    +++CameraRight

    ( I have a script on the PlayerControllerHAL that probes for the existence of the Rift and enables the appropriate Controller. I plan to treat the Hydra in the same way. )

    I have tried attaching the HydraDeckCamera script to the OVRPlayerController and the OVRCameraController, with the same result.

    Any ideas?
  • Teddy0kTeddy0k Posts: 205
    Hiro Protagonist
    You might need to set the "World Floor Y" value to match where the floor is in your world.

    It's worth noting this initial port only moves the camera around, I haven't tried to do anything that would move a player around, or handle collision or anything like that. The code's pretty straight forward, so it should be possible to apply it to this kind of scenario.

    If you get it to work for your game, I'd be happy to include your changes into the next release. Or if you're not so code inclined, I may be able to help out a bit
  • Teddy0K,

    Any chance of making the razer unity scripts available on a different website? Like Dropbox, google, or something? The mega website is blocked for me. Thanks.
  • Thanks for the Google download.

    I have followed your instructions but I don't understand step 3. The oculus has two cameras parented to the OVRCameraController, and that is parented to the OVRPlayerController. Which components gets the Hydradeck camera script add-on? I've tried them all, followed the on-screen directions, and nothing happens.

    I added the HydradeckHandController to the right hand, and nothing happens.

    Are there any steps that you left out? Thanks.
  • gg67gg67 Posts: 8
    NerveGear
    Add the Hydra Deck Camera script to the OVRPlayerController. Seemed to work for me.
  • siponsipon Posts: 4
    Hey I tried using this with the OVRPlayerController but I get some weird results.
    When I tilt the head sideways, the geometry seems to get some kind of stretch.
    Also, your controller doesn't seem compatible with the capsule collision detection of OVRPlayerController.
    Finally, the worldFloorY value shouldn't really matter when used with the capsule (worldFloorY should be the bottom of the capsule I guess).

    Anyway, it would be awesome if you could post a demo project that works with OVRPlayerController :)
  • I'm making some updates to this, will post up when I've got it all stabilised. I'll also include a demo Unity scene!
  • Awesome! I'm really looking forward to the update.
    Thank you very much for this! Keep up the great work!
  • Yes! Very excited to see what updates you make to this, as I tried the original unity assets you posted - but can't seem to get them to work properly. Thanks Teddy!
  • CaineCaine Posts: 208
    Manannan wrote:
    Yes! Very excited to see what updates you make to this, as I tried the original unity assets you posted - but can't seem to get them to work properly. Thanks Teddy!

    Same here, looking forward to the update :)
  • JoseJose Posts: 888
    Trinity
    Teddy00k wrote:
    I'm making some updates to this, will post up when I've got it all stabilised. I'll also include a demo Unity scene!

    Whoa. Who's this guy? (Notice the extra "0" in the username)
  • cyberealitycybereality Posts: 26,156 Oculus Staff
    I think it's the same guy, but I wonder what happened to his account.

    @Teddy0k: If you are having trouble logging in, PM me and I'll see if I can help.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i
    Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
  • Teddy0kTeddy0k Posts: 205
    Hiro Protagonist
    edited November 2013
    I've updated my Unity integration with a new version with lots of bug fixes;
    https://drive.google.com/file/d/0B1KRnJKwYT-0VllyNGlRQkdHeUE/edit?usp=sharing

    It now includes prefabs for a HydraDeckPlayerController and another for a HydraDeckHand.

    I've also included a simple demo scene so you can see it all working! Here's the new setup steps;
    1) Install the Sixsense unity plugin (http://u3d.as/content/sixense-studios/sixense-unity-plug-in/4pA)
    2) Add the SixenseInput prefab to your scene
    2) Unzip the HydraDeck scripts into the Assets folder of your project
    3) Add the Hydradeck\HydraDeckPlayerController prefab to your scene

    There may be a few issues with the Hand scale/position, my Hydra isn't working correctly at the moment so I can't test it fully. Let me know if you have any feedback.
  • Pretty cool stuff...
  • C06altC06alt Posts: 23
    How is it not working Teddy?
    Are you sure you don't have any metal objects close to your base and a clear line of sight?
  • Teddy0kTeddy0k Posts: 205
    Hiro Protagonist
    edited November 2013
    Looks like I made a mistake with the prefabs, try this one instead;
    Edit: nope!
  • hippopotamushippopotamus Posts: 4
    NerveGear
    Hi,

    i am getting "the associated script can not be loaded" in the prefabs :(
  • Teddy0kTeddy0k Posts: 205
    Hiro Protagonist
    OK, I think I got it this time. The lesson for future reference, export a unitypackage;
    https://drive.google.com/file/d/0B1KRnJKwYT-0VllyNGlRQkdHeUE/edit?usp=sharing
  • siponsipon Posts: 4
    tks a lot for the update :)
  • karrtoonkarrtoon Posts: 120
    Art3mis
    I am having a lot of trouble getting this working, I loaded the hydradeckdemo scene provided to test. After calibration, my guy is about 4 feet too tall. The hand is down by my knees. What's strange is, all other hydradeck based demos work with no issues when I calibrate to floor/chest/neck. I tried adjusting the player height, world floor y, and moving the hand but it did not work. I tried redownloading it using default assets again.. still no go. I'm just trying to get the hands from the demo scene right in front of the camera. Any ideas?

    Really wish I knew how to code it where you could press start and start shifting the hand up. Would make for an easy fix :(
  • sholeshole Posts: 8
    NerveGear
    I'm guessing this is because of the ovr plugin updates
    I fixed this by enabling 'use player eye height' and changing 'camera root position' y value to 1.8
    I'm sure there's a proper way to fix it, but it's enough for my testing at the moment
  • RasaRasa Posts: 1
    Assets/HydraDeck/Scripts/HydraDeckHandController.cs(20,40): error CS0246: The type or namespace name `SixenseHandController' could not be found. Are you missing a using directive or an assembly reference?


    Hi.........Thanks to share this super thing..........I got this error after import everything of your project kindly help to run your project in Unity3d.................How to fix this error.............
  • xhonzixhonzi Posts: 99
    Hiro Protagonist
    shole wrote:
    I'm guessing this is because of the ovr plugin updates
    I fixed this by enabling 'use player eye height' and changing 'camera root position' y value to 1.8
    I'm sure there's a proper way to fix it, but it's enough for my testing at the moment

    Yep- thanks for this... that seems to work.

    Now I have the problem of inverted position for the left controller. I stand up and the camera moves down. I sit down and the camera moves up.
  • [I know enough JS to be deadly but that's it]

    It appears that the latest Sixense plug-in in the Asset store included some breaking changes which render HydraDeck unusable.

    The first two compiler errors I've noticed (both in HydraDeckHandController.cs) are:

    1. SixenseHandController is now known as SixenseHandsController

    protected function UpdateObject(SixenseInput.Controller controller) is now known as

    2. UpdateHand(SixenseHand hand)

    I'll try to cobble through these, but, as I stated above. I'm just futzing around.

    Is there any chance that you can tweak this, Teddy, to work with the new Sixense assets?
  • StephanStephan Posts: 16
    NerveGear
    LOVE THE HYDRA DECK... I have two small issues / request

    1. The scale is not the same on MAC vs PC in Unity3D. The height gets really messed up.

    2. Sometimes the player position freaks out and you start bouncing around the map to different locations almost instantly

    Any chance these issues could be resolved?

    Best regards,

    Stephan
Sign In or Register to comment.