- Home /
How should I integrate Photon Network with my GPS application? (MapNav)
I am working on an Android application that shows a 3D map of a farm I work on with markers to indicate the location of personnel, vehicles and anything else that's worth tracking. Each of these trackable items will use their own LG L36c phone running the application to enter into the map.
Here's a screenshot of the program running in Unity. The blue marker is real and works just like a car GPS or Google Navigation. I've painted on some fake (red) markers to illustrate what I'm shooting for, and added names above each :
I purchased MapNav from the asset store. It made setting up the GPS/accel/compass stuff so so simple. Now I am trying to get things so that multiple users can log in on their devices and show up on the map.
I have a very basic grasp on how to use Photon Unity Network to set up MP environments and plan on using it as the communication between users. At first I just imported PUN and ran a basic networkmanager script on two devices, to see what would happen. Everything seems to have connected right, and each "player" joined the room I set up. Of course it didn't work out too well, since PUN didn't know who to give control of the MapNav marker to in the scene.
I am not sure what is the best way to approach this. I have a couple ideas, but don't even know how to implement them. One way I think might work is to have each user join their own private room and just share the X and Y coords with the other users, which would then let each instant of the application position the "other" markers in the right spots.
Like I said, I'm not exactly sure how to go about implementing that.
BTW, my experience with PUN is from trying a couple of quill12's MP tutorials on Youtube. In most of them there is a network script that spawns in the players when they join. That doesn't quite work with MapNav, because it seems to want the object tagged as "Player" to be there as soon as the game starts.
Thanks so much for your time. If anyone has experience with PUN and/or MapNav I'd really appreciate any help or pointers to get me headed in the right direction.