Search Unity

Question Shared-space multiplayer gameplay with Quest 2?

Discussion in 'VR' started by PascalTheDog, Oct 7, 2021.

  1. PascalTheDog

    PascalTheDog

    Joined:
    Mar 16, 2015
    Posts:
    86
    Hey,

    I'm a junior game developer and I've been hired by a VR arcade company to develop their first in-house video game, a location-based/shared-space multiplayer VR FPS. I'm having a very hard time ensuring the virtual space (i.e. the game in the headset) matches the physical space (i.e. the dedicated playroom). We're using Oculus Quest 2 headsets, the Unity game engine and the Photon PUN2 multiplayer solution. The project manager is adamant that it can — and should — be done with the Quest 2 (and possibly upgraded to the Quest 3 in the future).

    What I'm looking to achieve is:
    1. Mapping the Quest's guardian boundaries to the actual room's boundaries. The playroom's size is 36m² (6x6), and so should the guardian's.
    2. Mapping the avatar's location to the actual player's location with reasonable accuracy. A few inches off is not ideal but still okay, however anything beyond that will be noticeable, disruptive and even potentially dangerous as player might collide with each other.

    The core issues I've identified are:
    A. Quest headsets cannot be aware of each other; they can only be aware of their position and rotation within their own guardian's boundaries. I don't think there exists any out-of-the-box solution to this; some sort of calibration will be required. That's okay as long as the process remains fairly straightforward.
    B. Guardians are drawn by hand in a single continuous stroke, and unless you're some sort of cyborg there is no way you can have them be strictly identical — especially when the figure you need to draw is 36m². It would be a lot less error-prone if we could draw the guardian by simply picking the four corners of a square, but AFAIK that's not possible at the moment.
    C. Leaving the guardian area messes up its spatial mapping; upon reentry, the guardian boundaries will no longer match that of the room even if they more-or-less did before. I guess we could live with that by insisting that clients do not leave the play area, but redrawing the guardian every time a headset does inevitably end up venturing outbound is going to be a pain.

    None of the hacks I've found online appear to be wholly accurate or reliable. They always end up getting out of sync in one way or another.

    Assistance would be greatly appreciated. Cheers!
     
  2. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    For C:
    You should clear your guardian history, and only draw the guardian for that room once, because you might be getting any one of the guardians that have been drawn for that space when you put the headset on, which will potentially screw up world origin and rotation. (And the room should be decorated with "points of interest" so the guardian system can quickly identify the space)

    Also, you should try setting the tracking space's "Tracking Origin Type" to "Stage." That's supposed to be the mode to use for these situations.
    stagemode.png
     
  3. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315