Search Unity

[ARFoundation] Populate objects without trackable or raycast?

Discussion in 'AR/VR (XR) Discussion' started by opdich, Sep 28, 2019.

  1. opdich

    opdich

    Joined:
    Feb 23, 2017
    Posts:
    1
    Hi all,

    I've been struggling to find a good way to instantiate objects in ARFoundation "space" when I don't have a good raycast target or a direct trackable.

    A little background: I wrote a method in OpenCV to be able to recognize specific typologies of physical objects. It works well enough, consistently recognizing the objects. I get screen coordinates from OpenCV, but now I need to find a way to implement the object with ARFoundation.

    So far the best way is to raycast and hope it hits a trackable somewhere, but that behavior is inconsistent; when it does connect, the placement is spot on. Converting from screen coordinates to world coordinates doesn't even come close to the right placement.

    Are there other options to go from screen coordinates to world placement in ARFoundation?

    Many thanks