Search Unity

Resolved Triggering button from on trigger enter and exit.

Discussion in 'VR' started by dwatt-hollowworldgames, Sep 24, 2021.

  1. dwatt-hollowworldgames

    dwatt-hollowworldgames

    Joined:
    Apr 26, 2019
    Posts:
    104
    I want to have the user be able to touch ui buttons with thier vr hands rather than the usual pointer based system. I am trying to put a trigger box around items that are interactible and trigger it what the hands enter and exit. for example in on trigger enter I want to switch to hover, and in on trigger exit after an on trigger enter I will trigger the button as clicked. I don't see a simple function on the button that will change without filling a pointer struct with data I don't have. Any idea how to do this or should I just write my own button class?
     
  2. dwatt-hollowworldgames

    dwatt-hollowworldgames

    Joined:
    Apr 26, 2019
    Posts:
    104
    nvm got it working by using a camera on the index tip with a short range and a trigger covering the canvas to trigger button press release when entering and exiting the trigger.