Search Unity

Looking to add object mid Air without plane recognition using ARFoundation

Discussion in 'AR' started by M1tiens, May 3, 2019.

  1. M1tiens

    M1tiens

    Joined:
    Jun 1, 2017
    Posts:
    2
    Lately i've been looking on the features implemented by Unity on ARFoundation. I'm trying to instantiate coins in midAir according to the position i have based on the camera, adding each coin by a touch screen event. The problem i'm realising is i have to use Raycast and plane detection in order to be able to instantiate a prefab object. Has anyone managed to do anything similar? i can post the code i have so far if anyone can help me.

    Thanks in advance.
     
  2. Am33r007

    Am33r007

    Joined:
    Mar 11, 2019
    Posts:
    17
    I didn't try this but.

    So I'd like to also know how will Foundation do it.

    Using the Mira Prism SDK or the Holoboard SDK When placing a game object at (0,0,1) sets it hanging in midair. And that's just positional tracking (distance from headset).
    Similarly, are you trying the hang the coins in the air per-distance from the back camera? Because obviously they anchor to nothing in the physical world.