Skip to main content
Up and Coming
May 30, 2013

Sixense Hands attached to OVRplayer prefab?

Is there a step by step guide/tutorial that anyone can share that explains how to get the Sixense hands attached to the OVRplayer prefab? Thanks in advance!

I have had success attaching the OVRcamera to the demo scene however would love to have the OVRplayer prefab with the hands attached to work with!
    This topic has been closed for replies.

    9 replies

    Inspiring
    May 30, 2013
    You can try making the hands a child of the CameraRight in the OVRCameraController object.
    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
    Up and Coming
    May 31, 2013
    Thanks Cyber - that worked however I have no WADS control with the Hydra - WADS works fine with the keyboard (most likely a script that I need to complete). Once I can figure out how to include the joystick movement I will then move on to being able to interact with objects in the environment (right now my hands just float through the cubes that I included.

    Oh how I love not having a clue what I am doing :? :oops: :cry:
    June 8, 2013
    You have to exchange the ovrcameracontroller with a ovrplayercontroller. It already comes with all the scripts you need for basic wasd movement. Then just make the hands children of this ovrplayercontroller and you should be good to go.
    Up and Coming
    June 8, 2013
    LOL - I am slowly going crazy!!! My hands are present, I can move them with the hydra, however WASD does not work via the Hydra (yet it works on the keyboard)?

    Here is what I am doing:

    1) open up Sixense hands demo
    2) add terrain and the OVRplayercontrol
    3) add the hands as children to the OVRplayercontrol under the CameraRight within the OVRCameraController within the OVRplayercontroller
    4) start everything up - go through the hydra setup and my hands move yet the hyrdra will not move the player, only keyboard commands will.

    Thanks again for any assistance in getting my legs moving lol!!!
    June 8, 2013
    "space123321" wrote:
    LOL - I am slowly going crazy!!! My hands are present, I can move them with the hydra, however WASD does not work via the Hydra (yet it works on the keyboard)?

    Here is what I am doing:

    1) open up Sixense hands demo
    2) add terrain and the OVRplayercontrol
    3) add the hands as children to the OVRplayercontrol under the CameraRight within the OVRCameraController within the OVRplayercontroller
    4) start everything up - go through the hydra setup and my hands move yet the hyrdra will not move the player, only keyboard commands will.

    Thanks again for any assistance in getting my legs moving lol!!!


    The OVRPlayerController prefab doesn't come with hydra support by default. You have to adjust the controls inside the PlayerController script to make it work.

    Here's a dirty code snippet that should help you. http://paste.kde.org/763262/
    Up and Coming
    June 10, 2013
    Thanks again for all of your help MrMaffen - still working through this as I am receiving compiling issues once the script is inserted.
    Up and Coming
    June 17, 2013
    Still have not been able to get it to work lol :D :oops: :cry:

    I have zero coding experience here and am feeling overwealmed! If anyone can post a prefeb OVR character with hydra hands support and WASD movement attached I would be ever greatlful... I am looking at the Playmaker addon in unity to help with my lack of coding experience!

    Everything that I do I end up with compling issues :cry:

    Thanks again for any support offered!
    New Participant
    September 30, 2013
    Space123321,

    I had the same problem. MrMaffen basically gives the answer. Modify the OVRPlayerController script by cutting out the XBOX controller code and replacing it with this:

    // Hydra controller input      

    SixenseInput.Controller leftHandController = SixenseInput.GetController(SixenseHands.LEFT);
    SixenseInput.Controller rightHandController = SixenseInput.GetController(SixenseHands.RIGHT);
    // Compute this for xinput movement
    moveInfluence = Acceleration * 0.1f * MoveScale * MoveScaleMultiplier;

    // Run!
    if (leftHandController != null)
    {
    moveInfluence *= 1.0f + leftHandController.Trigger;

    // Move
    if(DirXform != null)
    {
    float leftAxisY = leftHandController.JoystickY;

    float leftAxisX = leftHandController.JoystickX;

    if(leftAxisY > 0.0f)
    MoveThrottle += leftAxisY *
    DirXform.TransformDirection(Vector3.forward * moveInfluence);

    if(leftAxisY < 0.0f)
    MoveThrottle += Mathf.Abs(leftAxisY) *
    DirXform.TransformDirection(Vector3.back * moveInfluence) * BackAndSideDampen;

    if(leftAxisX < 0.0f)
    MoveThrottle += Mathf.Abs(leftAxisX) *
    DirXform.TransformDirection(Vector3.left * moveInfluence) * BackAndSideDampen;

    if(leftAxisX > 0.0f)
    MoveThrottle += leftAxisX *
    DirXform.TransformDirection(Vector3.right * moveInfluence) * BackAndSideDampen;

    }
    }
    if (rightHandController != null)
    {
    float rightAxisX = rightHandController.JoystickX;

    YRotation += rightAxisX * rotateInfluence;
    }
    // Update cameras direction and rotation
    SetCameras();
    }


    Then just parent the left and right hand from the sixence unity plugin to the ForwardDirection object under OVRPlayerController and you'll have the same functionality found in the Sixense Tuscany Demo. I think.
    Up and Coming
    October 15, 2013
    OK, I got this set up working ( I think) but I need to figure out how to map jump (space bar) to a button (perhaps on the right controller?)

    thanks in advance