Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
1
Question by Captain_Dando · Mar 15, 2012 at 08:53 AM · iphonestringlocationgps

GPS location string

Hey guys

Is there an importable GPS string location which can be retrieved from iphones or android devices into unity? For example, I want to run different code depending on where the player is in the real world, however I don't want to use precise gps locations. Rather, if the phone knows the player is in "derp park" or whatever , then it would fire a script.

Comment
Add comment · Show 17
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 fherbst · Mar 15, 2012 at 09:01 AM 0
Share

No. You will have to match a precise position to an area. There may be a service doing right that, but you will need a position first.

avatar image Captain_Dando · Mar 15, 2012 at 09:10 AM 0
Share

Damn, I thought that might be the case.

In that case, would I be able to create 4 positions, creating a square, around the players location, creating A broader area? And then react when that square moved covered other set coordinates for locations? (Such as the afformentioned park?

avatar image syclamoth · Mar 15, 2012 at 09:46 AM 1
Share

@Captain_Dando- Can you stop posting comments in the Answer section? It messes up conversation ordering, and makes work for me.

avatar image fherbst · Mar 15, 2012 at 10:12 AM 1
Share

Well, you get a latitude and a longitude - the "most correct" way would be to have your character on a sphere :) but for your local problem, you can simply approximate them as x,y coordinates. If you need something global, have a look at map projection techniques.

avatar image Captain_Dando · Mar 15, 2012 at 10:18 AM 1
Share

Thanks for the help guys, you've officially answered all my questions. I don't think I need any more help but i thought I'd share what I'm up to anyways. The map system isn't the main component in my game and I'm debating whether that virtual world would even be shown at all. as it stands, this is the system I am going to use;

the person doing the exploring will be given a tag (something coordinates). that tag controls his object in the virtual map. when that object collides with objects on the virtual map (which correspond with the real world coordinates) a script will be run. Upon leaving the collider, the player will be outside, in unimportant areas, which don't need to be logged.

in order for unity to interpret the gps position I will flatten the gps coordinates to full numbers, and scale the game to fit those numbers with unity's own coordinates. It will take a long time, but after many months of gradually adding colliding objects to the game world I will have a vast library of locations to trigger separate scripts.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Input.location.start always times out 1 Answer

Reverse Geolocation not returning correct country name 0 Answers

Any Augmented Reality SDK plugin with Geo-Location functions? 1 Answer

Ask for Location permission at the start of the App 2 Answers

Is there a way to access GPS data/Input.Location without wifi? On my device (S7) it only works with. 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