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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Multiplayer FPS

Discussion in 'AR/VR (XR) Discussion' started by ArtLove, Aug 1, 2017.

  1. ArtLove

    ArtLove

    Joined:
    Oct 16, 2012
    Posts:
    49
    Hello all,

    I'd like to paint a picture to better explain what I'm looking to do.

    I'm looking to create a FPS where person A can shoot person B in the real world, no graphics. Both users would have the app installed and running on their phone.

    How it works work is person A would turn on the game and search around for enemies in the real world using the phone camera. The game would place a blue market above person B's head when A faces their camera towards B.

    A would then press shoot thus damaging B.

    Is there an effective way to accomplish this? I'm thinking I may need GPS and elevation tracking. A 2d map would hold the players location and elevation. So when you shoot, a bullet on the 2d map will move forward. The player would only see the real world on the game. But how can I program to differentiate a human from and object.
     
    Last edited: Aug 1, 2017
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Unity has a tutorial series for multiplayer FPS, check here:


    For blue markers, physical obstructions, you'll need an AR SDK like vuforia or Google tango.
     
  3. ArtLove

    ArtLove

    Joined:
    Oct 16, 2012
    Posts:
    49
    Hello Selzier,

    Thank you for the information. Here is a better explanation of what I'm looking to do.

    I want users to use their phone camera as a gun. On the phone screen you'll see the real world and all people using the app will have a colored marker over their head.

    While using your phone camera, you can aim at a person and press shoot. I would assume that I'd need to take into account the geolocation, angle, and elevation of the shooter and victim. Then raycast from the shooter to the direction they are aiming (if have a not visible top down map displaying player geo locations. The issues is if there is a real life wall between the player, the game cannot distinguish that.

    My question: is there a good way to click something on the camera screen and have the game know if what you clicked is an active users or something else?

    I'm looking to do something similar to the attached link, but without the third party ladder adapter.

    http://father.io

    Would vuforia or tango assist with identifying a person versus a wall?
     
    Last edited: Aug 1, 2017
  4. ArtLove

    ArtLove

    Joined:
    Oct 16, 2012
    Posts:
    49
    To clear it up, I need direction regarding human recognition in augmented reality. The system would need to know the difference between a player and a wall/object
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  6. ArtLove

    ArtLove

    Joined:
    Oct 16, 2012
    Posts:
    49
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446