Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How to register squeeze response on triggers of oculus touch?

Discussion in 'AR/VR (XR) Discussion' started by Hanne_Huygelier, Mar 3, 2017.

  1. Hanne_Huygelier

    Hanne_Huygelier

    Joined:
    Jan 4, 2017
    Posts:
    9
    I have been trying to make the triggers on the oculus touch controllers respond just to a squeeze.

    Based on the manual about getting input from the touch controllers I know that joystick button 15 responds to the secondary index trigger on the touch controller. But, if you use this button you register every touch of that button. I would only like to register a squeeze. Based on the manual I thought you had to specify the joystick axis as the 10th axis. But, if you make a button in the input manager that responds to joystick button 15 that only reads input from the 10th joystick axis, it still registers a touch of the button. When you only read input from the 10th joystick axis and do not specify a positive button name, then nothing is registered.

    Does anybody know how you can only register a squeeze?

    I am using Unity 5.5.1.

    Thanks!
     
  2. Hanne_Huygelier

    Hanne_Huygelier

    Joined:
    Jan 4, 2017
    Posts:
    9
    I figured it out. I had to use Input.GetAxis instead of Input.GetButtonDown.