Forum Discussion
space123321
12 years agoExplorer
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!
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!
9 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionYou can try making the hands a child of the CameraRight in the OVRCameraController object.
- space123321ExplorerThanks 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: - AnonymousYou 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.
- space123321ExplorerLOL - 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!!! - Anonymous
"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/ - space123321ExplorerThanks again for all of your help MrMaffen - still working through this as I am receiving compiling issues once the script is inserted.
- space123321ExplorerStill 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! - chen74Honored GuestSpace123321,
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. - ricard2798Honored GuestOK, 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
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago
- 8 months ago