Search Unity

HTC VIVE: Button Not Detecting Raycast Properly

Discussion in 'VR' started by NAUIVRLab, Mar 14, 2019.

  1. NAUIVRLab

    NAUIVRLab

    Joined:
    Feb 15, 2019
    Posts:
    3
    I have a project with multiple world space UI canvases. These canvases have buttons on them, the controller casts a ray while the user has their thumb on the Touchpad (TouchpadTouch), and the user can click a button by pressing the Touchpad while the ray is cast (TouchpadPress). Most of the buttons work as expected, however, two of them are exhibiting unusual behavior. I'll refer to these as ButtonA and ButtonB for brevity.

    ButtonA: Only detects raycasts (highlighted behavior activates) when the ray is cast from certain angles (namely a high angle such as holding the controller overhead), or the ray is hovering over certain areas of the button (irregular, live area changes each time the game is put in play).

    Expected ButtonA: Detects raycasts (highlighted behavior activates) as long as the ray is on the button area.

    ButtonB: Doesn't detect raycasts at all (highlighted behavior does not activate) regardless of where the ray is on the button, or the angle that the ray is cast from.

    Expected ButtonB: Detects raycasts (highlighted behavior activates) as long as the ray is on the button area.

    Has anyone else experienced behavior like this before? I've tried looking to see if something is blocking the raycast, and I can't seem to find any culprit.