I want to implement this secuence of interactions:
- User grabs a flashlightwith LeftController
- Flashlight can be set on/off with a LeftController's button
- User now grabs the same flashlight with RightController
- Flashlight now can be set on/off with a RightController's button
- I can only toggle on/off the flashlight by specifying a button, but that button will be responsible for doing so regardless of which controller is holding the flashlight
- This is something that is used in VRTK farm scene, where you can shoot handgun with the trigger of the controller that is grabbing the handgun but I can't find where or how the handgun know which controller is grabbing it or how it switches between input listeners
How to listen for different button/trigger depending on which controller is grabbing the flashlight/handgun?
Source of VRTK: GitHub.
Version of VRTK: (GitHub) v4 beta.
Version of the Unity software: Unity 2018.4.0f1.
Hardware used: Oculus Quest.
SDK used: Oculus Utilities.