Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

How to touch Object then show information panel in AR

Discussion in 'AR' started by AlifiaSals17, Jun 8, 2020.

  1. AlifiaSals17


    May 2, 2020
    Hi everyone,

    I'm just started to learn ar with vuforia in
    unity and i get some trouble when i want to make my 3d object clickable and it will show information panel.
    This is my ar hierarchy. The blue pointer is my information panel about the object. While 3d object in "sistempernapasan". In this case, i want to try click "kepala" object and it will show "PanelHidung" in Canvas.
    View attachment 638036

    Then, i try to add box collider component to "kepala"
    View attachment 638039

    And here is my script for Show Panel
    View attachment 638042
    I didn't get any error message but it can run properly when i tested via webcam. My 3d object cannot be clicked and it don't show the panel. I'm sorry if it poor question.
    I'd really appreciate any help from you guys.
    Thank you :)
  2. gtramnull


    Apr 23, 2020
    Not sure if you've already tried this but you might look into using Raycast? Say you have a prefab in front of the camera then you get the raycast from touch into the world and see if hits something. If it does then check what object it is, so on and so forth.