Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  3. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  4. 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
  5. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Raycasts in AR ??

Discussion in 'AR' started by lkdin, Dec 2, 2019.

  1. lkdin

    lkdin

    Joined:
    Jun 29, 2018
    Posts:
    10
    Hey AR Devs,

    I'm having following problem and i wonder, if anyone has a suggestion for it.

    I have a normal ARFoundation scene where i want to click on objects in the 3D scene.

    So naturally i would use a RayCast like this: Ray ray = arCamera.ScreenPointToRay(touch.position)

    But it doesn't work correctly. When trying to click the collider there is always an offset, so instead of clicking on the object i have to click next to it. The collider is wrong on any object i try to click on.

    If anyone has a suggestion on how to tap or click on objects in AR please let me know.

    Thanks!
     
  2. mandivision

    mandivision

    Joined:
    Mar 17, 2019
    Posts:
    8
    This video has a method that works:
     
unityunity