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
0
Question by yashesh · May 15, 2015 at 11:38 AM · androidmovementdevicemovedirection

Get device moving direction like Left to Right and Top to Bottom.

Hello All,

I want to get Android device movement like whether my device move from left to right or it's moves top to bottom. For example my android device is on the table and if i moved my device from left to right or top to bottom then i want that direction.

I have checked the accelerometer and Gyroscope but it's not working in my case.

So can anybody provide me hint so some reference to solve my problem ?

Thanks

Yashesh

Comment
Add comment · Show 4
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 tanoshimi · May 15, 2015 at 01:24 PM 0
Share

Well, the accelerometer and gyroscope are used for exactly that. If they're not working in your case, it's either because your phone doesn't have those features, or you're using them incorrectly. Without knowing the phone or code you're using, it's impossible to say which.

avatar image yashesh · May 15, 2015 at 01:38 PM 0
Share

@tansihimi Thanks for your reply.

I have created one demo to retrieve Accelerometer and Gyroscope. I have display it's value on UI so that i can see that.

All the values are updating perfectly so there is no change that my device is not support Accelerometer and Gyroscope.

Now, I have continuously see the update value from the gyro and accelerometer but non of the value is updating as per the my requirements.

$$anonymous$$ay be there will be some calculation from Gyro and Accelerometer to get desire output but unfortunately I am not aware of it. So if possible for you to give me some more info on this then it will be good.

Waiting for you positive reply.

avatar image tanoshimi · May 15, 2015 at 01:42 PM 0
Share

If you're just not understanding what the values mean, I suggest you read: http://developer.android.com/guide/topics/sensors/sensors_motion.html

avatar image yashesh · May 15, 2015 at 01:46 PM 0
Share

@tanoshimi Thanks for providing link :)

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

19 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

Related Questions

2D Vector Movement,Vectorel Movement with Buttons 2 Answers

Character Movement Problem 0 Answers

htc hero and unity3D android 3 Answers

Accelerometer isn't Registering on Android Device - Accelerometer is good, and Code runs on Other Androids and iOS devices 0 Answers

GUI Size on different Android/iOS Devices? 3 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