• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by dmit99_ · Sep 23, 2019 at 11:40 AM · androidaugmented-realitygooglelocationgps

AR + GPS location based object/ collider

Dear reader, I typed this question two times and I was almost done, but because of clicking a link in this editor where I typed this question in, or closing the page on accident, I'm kinda sick of it to retype it again but here we go.


I'm currently working on a game that uses GPS location and AR as a student.
I want to make a game that is GPS location based. You must walk around and once you are close to a specific GPS coordinate you should be notified, and the scene or game should switch over to AR. You should see an object that needs to be placed on a GPS coordinate as well so you can walk around the object and it will stay on the exact spot as it is to someone else on their phone.

It will be an outside 'Game' so I can't place any objects on the ground like a piece of paper. If I could do that. Vuforia was my way to go. I am trying for over 3 weeks now and still got no result.

I have tried many things like AR-Kit, AR-Foundation, AR-Core.

I even tried third-party plugins like: MapBox, Vuforia and a AR-Kit + AR-Core instruction.


MapBox: Has GPS tracking and uses Google's satellites if I had it read correctly. But has no good AR function to place an object on a GPS location. You can do it with a Tiff image in the MapBox studio but no FBX file or something "Unity" stuff like a collider or box object. So, I can't create an event or call up a method with this.


Vuforia: Does have great AR support but nothing with GPS. It can only scan an image that looks the same as the one you have placed in the database from the Vuforia website. But you can't place it on a GPS location.


The instruction: Is very outdated and is made in Unity 2017. In the video's description on YouTube he let us know that he won't remake it because it's not an easy task to make it. He left he's GitHub project public, but I don't think this is a solution for me to get this done in a week or two. The creator is using GameSparks to create events but it's so outdated I kinda went off track on this one. It was way too complicated.


Another way?

I did find another way and that's the AR+GPS asset. But it's expensive. Almost every tutorial for AR + GPS location-based objects are using this asset. But there must be a way to make it free right?


Does anyone have any idea or can give me tips to make this in 2019? There must be a way that's free.

Comment
DirtyFred

People who like this

1 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by dmit99_ · Oct 01, 2019 at 02:22 PM

I have been working on this project for a few weeks now. I find out that AR core / Ar Foundation and Mapbox worked great for once and choose that sollution to work with. It worked once and tried to build it. But had to turn my pc off because I had to go and that corrupted my unity I guess.


So it gave me a value error and had to remake the project for the 5th time with bad result every time. My AR is working propperly but as soon as I add MapBox SDK to it. My AR camera will be black and AR won't be turned on ever again.
I still can see my object in the scene but can't walk arround my object or go closer to it.
I think ARcore/ ARFoundation might have the same values as MapBox uses and in that case it might conflict each other.


To try to fix this issue,
1, I deleted the mapbox AR folder.
2, Checked settings and build settings a hundred times and changed them to try out if it worked then.
35 builds later still black screen result.


I tried finding another similar thing like Mapbox and found Google maps has its own SDK but the map wasn't as I hoped it was so it is no option I guess.
Any tips?

EDIT:
I finaly managed to fix this issue and it works!
Once you have your UnityScene loaded up. Install the Mapbox package. Uncheck the folders from GoogleAR, the two UnityAR folders and the MapboxAR folder. So you only have the MapBox folder and the thirdparty folder left.
Next up install the ARcore / ARkit (Depends if you want to work with Android or IOS.) And install the ARFoundation in the package manager tab from Unity. Create your default scene for mapbox (by using the mapbox prefabs) and the scene for your AR by:
Hierarchy -> rightclick -> XR -> AR session.
And add the: Hierarchy -> rightclick -> XR -> AR session origin.
Add your object in the AR scene and there you go! Mapbox with ARcore!
Enjoy your PokemonGo game.

Comment
DirtyFred

People who like this

1 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image yannvasseur · Apr 28, 2021 at 04:38 PM 0
Share

Hi, I don't know if this works yet, but finding someone having the same issue is already a satisfaction.

So what you are saying is, there is an order to install all these packages ?

For my case, AR Object display ok using GPS coordinates. I apply a color on each AR items and this is ok.

But as soon as I add Mapbox (Only Mapxbox and thirdpartyAssets) things getting bad. I lost the color.

Adding all the Mapbox packages causes conflicts between Mapbox AR and aready installed packages (AR Fundations, AR Core/Kit)

So I don't know what to do. Use mapbox render my AR Object black. Even with the color applied). If I remove Mapbox Assets folder, color is back All good.

I don't understand why there is an "install order"...

avatar image

Answer by DirtyFred · Mar 08, 2021 at 03:26 PM

Hi,


I have been trying to do this. Just importing the Mapbox unity package works fine. I have tried the examples and they are working good.


The problem is the World scale AR is not accurate. Sometimes it works, most of the time it doesnt. It places the objects not in the correct Lat Long coordinates in the AR world.


Does anyone know a good solution for this?


Thank you

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

255 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Issue in displaying closest POI to a user in Augmented Reality application 0 Answers

Does ARCore disable the ability to get my GPS position? 1 Answer

Get Android devices current country location 0 Answers

How to pass accurate GPS location from android studio to unity? 0 Answers

Reverse Geolocation not returning correct country name 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges