Search Unity

Location Based Games (Mapbox SDK)

Discussion in 'Multiplayer' started by highpockets, Mar 6, 2020.

?

Use “ ImmediateUpdateWithLocarionProvider” for player using Mapbox SDK or not?

  1. Yes

    66.7%
  2. No

    33.3%
  1. highpockets

    highpockets

    Joined:
    Jan 17, 2013
    Posts:
    71
    Hello all,

    I wanted to start this thread to talk about the Mapbox SDK and best practices while using it for creating a location based game.

    I just started a new project with it based on my client’s suggestion to use it. It is a great tool and I have managed to advance quite a bit in just a couple days with it.

    One thing I am curious about is the “ImmediateUpdateWithLocarionProvider”class that seems to be the default for a player. I’m wondering why this is default just because if there is any lag or the device doesn’t update GPS coordinates for a period of time and suddenly jumps to a new position, this would look a bit awkward on screen. I would think that a gradual movement with, for example, a Lerp function or something similar would feel much more smooth. I know it would be highly suggestive to ask what is the best practice in this situation, but I’m just curious to know if anyone has some experience with this and would like to share.

    Cheers,

    Kris
     
  2. highpockets

    highpockets

    Joined:
    Jan 17, 2013
    Posts:
    71
    Not sure what your comment is about. I wasn’t discussing a tutorial which I believe is what you’re on to here.

    Anyhow, I stopped using Mapbox for the project for the time being and I am currently implementing the Maps SDK from google maps instead. I found a lot of conflicts between Mapbox and other SDKs.. Also I ended up using Immediate position update for a game object which represented the phone. Thereafter I updated the player position smoothly by following the device phone object with a buffer/offset to give realism.

    maybe I will come back to Mapbox because google has not approved my application to use the full SDK yet and the demo restricts users to test development in the editor and only within a scaled down version of New York

    Cheers
     
    Last edited: Mar 18, 2020
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    He's just a link spammer. Just report him.