Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by fergie77 · Jan 23, 2017 at 07:36 PM · positioningaccelerometercamera movementsensor

Using device sensors to detect position in world space

Is there a way to currently do this? I've aware of Google's Project Tango but that's limited to Android devices. I'm looking to have the device pick up it's position and move the camera in the world view related to that devices position. I've been building and AR app and this functionality would be incredibly useful.

I've looked into using the accelerometer for this, but that would involve tilting your head to move in each direction, not exactly ideal.

Does anyone have a solution for this?

Comment
Add comment · Show 2
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 fergie77 · Jan 24, 2017 at 07:44 AM 0
Share

Thanks for your responses. To @tanoshimi I'm looking for something a bit more accurate, GPS only works up to around 10 metres or so. I'm needing as close as possible!

@Chris_Payne_QS I've used Vuforia before and I know what you mean, it would be a lot easier if I could use a trackable image of some sort but I don't think I'll be able to. I'm making an AR app to help golfers with putting, I'd prefer to not have to ask them to take something trackable along with them on the course.

avatar image tanoshimi fergie77 · Jan 24, 2017 at 07:58 AM 0
Share

I'm not sure what answer you're expecting that would be available using consumer hardware. GPS is the only publicly-available technology for detecting the position of an object at an arbitrary location anywhere in the world. (Good GPS devices can be accurate within 3m about 95% of the time)

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by tanoshimi · Jan 23, 2017 at 07:38 PM

Sounds like you're looking for Input.location, which will give you the device's position based on GPS or other location service.

Comment
Add comment · 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 fergie77 · Jan 23, 2017 at 10:22 PM 0
Share

@tanoshimi I'm needing something a bit more accurate than GPS, less than 1 metre if possible

avatar image
1

Answer by Chris_Payne_QS · Jan 23, 2017 at 09:44 PM

I presume you're referring to a mobile device. Short answer is yes, but not easily.

Most mobile AR apps require something in front of the camera (a checkerboard or printed QR code) so that they can figure out where the viewport is in relation to that - but that's still a hardcore image processing problem. You may be able to integrate someone else's solution into your app though - give this a try, for example: http://www.justapixel.co.uk/how-to-make-an-ar-app-in-5-minutes-with-unity-and-vuforia/

Comment
Add comment · 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 fergie77 · Jan 23, 2017 at 10:24 PM 0
Share

@Chris_Payne_QS I've actually used Vuforia before, and I know it would be easier if I could use a trackable image of some sort. I'm making an AR app for golfers to help with putting, so would prefer if I could use a solution that doesn't need anything other than the device they own. I'd considered trying to access the pedometer but the maths is confusing the hell out of me haha!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Smooth continuous movement with fast updating position 0 Answers

Aircraft Animations 1 Answer

Sensor Fusion of Accelerometer and Gyroscope 0 Answers

Map sensor(accelro+gyro) axis to unity character in realtime 1 Answer

Input.acceleration uses gravity sensor 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