Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question XRSimpleInteractable Activate with XRRayInteractor

Discussion in 'XR Interaction Toolkit and Input' started by green-giant, Nov 5, 2021.

  1. green-giant

    green-giant

    Joined:
    Jun 21, 2013
    Posts:
    43
    I have an object in the scene with XRSimpleInteractable and an XRRayInteractor attached to my controller. I want to be able to point at the object and "click" on it with the trigger and fire a method. The problem is the trigger is bound to the Activate action (like normal) and Activate wont fire unless you are first "selecting" the object by holding the grip button.

    I realize I could change the Activate action binding to the trigger, but I have other things going on in the scene and need to preserve the distinction between "grabbing" things with the grip button, and "Activating" with the trigger

    How can I get an event on my object when the user points at it and pulls the trigger?
     
  2. AvinashB9

    AvinashB9

    Joined:
    Feb 10, 2021
    Posts:
    14