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 OVRca...
chen74
12 years agoHonored Guest
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:
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.
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.
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
- 10 months ago
- 9 months ago