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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

¿How to make an asymmetric multiplayer scene with ARcore?

Discussion in 'AR' started by Aupuma, Feb 20, 2018.

  1. Aupuma


    Feb 15, 2017
    Hi, I am doing research for my degree's final project because I want to make an asymmetric multiplayer game with Unity. One player has to use ARcore to see the scene from above and the other player is controlling a character from a FPS view, without ARcore.

    I have read the article that introduces ARinterface and I have tested uNet with both smartphones and the connection works fine, but I don't know if it is possible to have in the same scene a player that does not use AR but interacts with the scene.

    The flow of the game could be similar to the AR Tanks demo: First an AR Setup scene, then a lobby and finally the main scene.
  2. tdmowrer


    Unity Technologies

    Apr 21, 2017
    Sounds interesting! The major difference between AR Tanks and the regular Tanks tutorial is the camera logic. The original tutorial has camera logic that resembles a third person tank game -- for AR Tanks, we just threw that out and made the cameras follow the AR device.

    It sounds like you want the original camera logic on, say, a PC, and the AR camera logic on Android and iOS. Your C# script can use something like
    Code (CSharp):
    2.     ...
    3. #else
    4.     ...
    5. #endif
    to distinguish between the platforms.
  3. Aupuma


    Feb 15, 2017
    Sorry for the late response, I've been really busy with other projects! So, I have the AR Setup Scene that came with the tanks game and when I choose a plane, instead of loading a lobby scene I load a new scene with the level map.

    Code (CSharp):
    2.         void LoadGameScene()
    3.         {
    4.             CustomNetworkDiscovery.Instance.StartBroadcasting();
    5.             NetworkManager.singleton.StartHost();
    6.             GetComponent<ARPlaneChooser> ().enabled = false;
    7.         }
    When it loads the new scene it instantiates all the objects of the map, but the camera gets stuck with the same image and there is no tracking. However, if I connect from the other device to the same scene and move an object it is displayed correctly in the AR device, the objects in the scene are moving and acting correctly, but there is no tracking