Search Unity

Question regarding ARHitTestExample

Discussion in 'AR' started by Yuribexo, Apr 25, 2018.

  1. Yuribexo

    Yuribexo

    Joined:
    Mar 5, 2018
    Posts:
    3
    Hello people, a new developer here starting my way into the AR world. I'm learning all the docs you provide and trying to be a good developer in the future but at moment I'm experiencing an issue while trying to develop an easy interface in order to make the following:
    The current game object in the scene has to be rotated. I've been able to place the object in the mobile app without much problems by using the ARKitScene. I've also created the UI to scale to the mobile app correctly, but when I'm trying to modify the script for the UnityARHitTestExample, I'm not able to make the app verify when I want to apply an object in the scene or when I'm interacting with the UI Buttons.

    I'm posting the CS of the game object and the button I'm currently using and also the Unity interface.

    Please, let me know if I'm doing something wrong with the script as I can't see to find the current issue at moment by myself. It will be much appreciated. Thanks for your time, people.
     

    Attached Files:

  2. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
  3. Yuribexo

    Yuribexo

    Joined:
    Mar 5, 2018
    Posts:
    3
    Hi @richie-greene thanks for your reply.

    I did solve it at the end by myself, but I'll explain where the issue was.

    I've used the IsPointerOverGameObject, but the issue with my app comes in the canvas.

    I did insert a panel between the canvas and the buttons in order to be able to scale the UI canvas regarding the resolution/device I wanted to deploy the app. By removing the panel in the middle, the function did start to work correctly again.

    Take into detail this kind of configuration because at the end is not regarding code the issue, is missconfig inside Unity editor.

    Take care and thanks for the reply @richie-greene. Kind regards.
     
  4. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    Glad to hear ya got it sorted @Yuribexo
    Onwards and upwards!!
    R