Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved AR Face tracking Android

Discussion in 'AR' started by antoniskamzel, Jun 7, 2021.

  1. antoniskamzel

    antoniskamzel

    Joined:
    Feb 18, 2020
    Posts:
    25
    Hello, I've installed AR Foundation along with ARCore, ARKit, XR etc, all of them but I can't get face Tracking to work on my Android phone. I've seen tutorials on youtube making it work on android but I just can't. Does anyone know what's going on with compatibility? And if anybody know a way to do so, that would be highly appreciated. Thanks!
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,076
  3. antoniskamzel

    antoniskamzel

    Joined:
    Feb 18, 2020
    Posts:
    25
    My device is in this list (POCO X3 NFC).

    To be more specific with the problem. I follow this tutorial (and many others like this)

    but when I build and run my app on my phone, I get a black screen and the camera won't even show anything.
    And also in Player Settings > Graphics APIs I removed Vulkan, and then in XR Plug-in management I enabled ARCore and I was able to get the camera to show something but instead of the front camera it uses the back camera of the phone and it won't even do anything if I turn it around.
     
    Last edited: Jun 8, 2021
  4. FrankvHoof

    FrankvHoof

    Joined:
    Nov 3, 2014
    Posts:
    258
    I believe face-tracking only works with the front camera? (Not sure).
    You might have to switch the camera that you are using (Set the 'Facing Direction' on the ARCameraManager to 'User').

    Edit: Otherwise it might just be erroring during Init? Are you getting any logs?
     
  5. antoniskamzel

    antoniskamzel

    Joined:
    Feb 18, 2020
    Posts:
    25
    You are totally right, I haven't noticed the 'User' facing direction. Now it works fine. Thanks!
     
    AkashGurav likes this.
  6. ZemGameZ

    ZemGameZ

    Joined:
    Sep 29, 2020
    Posts:
    2
    You sir, are a true champion! Thanks for that..
     
  7. hojjat

    hojjat

    Joined:
    Jul 24, 2018
    Posts:
    2
    Check Il2cpp Build ,
    Its work for me