Implementing GameObject Interaction with Pressable Button on HoloLens 2 instead of finger

Oualid kilani 5 Reputation points
2024-10-05T18:26:22.69+00:00

I would like to know how i can make a Gameobject in unity interacting with a pressablebuttonhololens2 the same way as a finger ! Thank you for your answer

HoloLens Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-10-08T03:46:52.3933333+00:00

    Hello, Welcome to Microsoft Q&A,

    If you want to make your own pressable buttons, you can use components like PressableButton and PressableButtonHoloLens2 provided by MRTK. To learn more about how to use them, please see - Buttons - MRTK 2 | Microsoft Learn.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Anonymous
    2024-10-10T06:56:22.7033333+00:00

    Hello, Welcome to Microsoft Q&A,

    If you want to implement objects that can interact with and press buttons provided by MRTK, here are the steps you need to follow:

    1. Ensure that the Interactable component is added to the buttons.
    2. Set up collision detection or distance detection between the objects and the buttons to determine conditions under which the press action will be triggered.
    3. When conditions are met, set the property HasPress of the button’s Interactable to true.

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.