Search Unity

ARCore and Scene Positioning

Discussion in 'AR' started by Gingerale0X, May 6, 2019.

  1. Gingerale0X

    Gingerale0X

    Joined:
    Nov 23, 2018
    Posts:
    1
    Hi, my name is Alessandro and I'm trying to deal with ARCore, but the documentation and testing so far didn't bring me much closer to my final aim, so that's why I'm writing here:

    To be clear, I will call the unity scene showing in the real world space = RLScene
    while the Scene itself in unity's editor would be = UScene

    I have a mobile multiplayer game (running on PUN2) that has a 3rd person camera (using Cinemachine) following a controllable rolling ball (3Dphysics involved) all set up and running.
    You go around picking up coins that randomly spawn only after you or rivals picked up the previous one.
    I want the player to switch into AR camera (Disable all the cinemachine cameras/input), he would then scan for a horizontal plane surface with his phone, tap on the screen to "fake-spawn"(*) RLScene; Give him the possibility to rotate the scene on its horizontal axis and have it zoomable, to better look around for coins without moving too much in Real world space; And finally, give him the ability to raycast a beam from the playing ground if he touches anywhere in the RLScene (which would be shared through others player UScene or RLScene - making it more challenging as coins are the same on map for everyone).

    I did get close to the result with Vuforia but it was really poorly optimized and I had to use a tiny QR paper to "fake-spawn" the scene on it, but I did like the idea of every player having his RLScene with shared beams more, so I moved to ARCore, tried different versions with almost no success.


    (*) I'm saying fake spawning because it should be the same GO I hid before (same position, rotation it was in UScene for the editor before camera switching)

    p.s. I might have overcomplicated it, but I can't figure it out rn.