- Home /
Question by
rustyruss1985 · Apr 29, 2019 at 01:44 AM ·
inputcontrolleroculusoculusriftoculus rift
cannot read button input from oculus go (but able to read rotation)
Hello, for some reason i am able to get the rotation of my oculus go controller:
OVRInput.Controller c = leftHanded ? OVRInput.Controller.LTouch : OVRInput.Controller.RTouch;
if (OVRInput.GetControllerPositionTracked(c))
{
controller.localRotation = OVRInput.GetLocalControllerRotation(c);
controller.localPosition = OVRInput.GetLocalControllerPosition(c);
}
but i am unable to sense any button presses:
if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger) || OVRInput.GetDown(OVRInput.Button.Any))
{
transform.RotateAround(Vector3.zero, transform.up, 100 * Input.GetAxis("Mouse X") * 2 * Mathf.Deg2Rad);
transform.RotateAround(Vector3.zero, transform.right, -100 * Input.GetAxis("Mouse Y") * 2 * Mathf.Deg2Rad);
Camera.main.backgroundColor = Color.red;
}
does anyone know whats wrong with my button input? all i want to do is get when the trigger is down, so i can perform some rotations/color changes
thanks
Comment
Your answer
Follow this Question
Related Questions
XR Interaction Toolkit Preview detecting wrong controller 1 Answer
oculus rift single shot on SecondaryIndexTrigger pull 1 Answer
OpenXR Continuous Turn and Movement not working 0 Answers
Why Unity crash every time I exit the play mode ? 1 Answer
OVR Grabbable causes object to ignore OnCollisionEnter/Exit 2 Answers