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 eddyjohnson3 · Mar 20, 2014 at 06:08 PM · inputaccelerometeracceleration

Input.acceleration always returns zero on specific project

Hi so Im stuck with the following problem developing for Android - Input.acceleration always returns zero, but only on specific project. The accelerometer works fine on other projects, but I get zero on a specific project in more than one device. So I am wondering if there are any project settings that can disable Input.acceleration.

Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by eddyjohnson3 · Mar 21, 2014 at 02:32 PM

Turns out the MobileCore ads that I was trying out were to blame. Their SDK is somehow completely desabling the gyro.

Comment
Add comment · 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
0

Answer by Arshia001 · Mar 20, 2014 at 06:42 PM

There is, actually: It's called Input.GyroEnabled or something like that if I remember correctly. Just look through all of Input's properties, you'll know which one it is. I think it has Gyro in the name, so if you've already looked for "AccelerationEnabled" and not found it, look again and you'll see it.

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 eddyjohnson3 · Mar 21, 2014 at 01:57 PM 0
Share

I tried: Input.gyro.enabled = true;

Unfortunately it did not help. Gyro on the same project works fine on iOS. Really starnge...

avatar image
0

Answer by YourGamesBeOver · Mar 21, 2014 at 02:07 PM

I've heard of people having issues similar to this; something not working in just one project when it really should. The only general solution I've seen is to export your entire project as a .unitypackage, then make a new project and import it. It seems to fix a lot of problems, and it's worth a shot.

Comment
Add comment · 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
0

Answer by joonturbo · Apr 14, 2017 at 12:39 PM

There is an AccelerometerFrequency setting, only visible int he Player settings inspector for iOS builds.

I was developing on Android, and using Cloudbuild to build for iOS. This setting is invisible in my editor, but you can go into ProjectSettings\ProjectSettings.asset and find accelerometerFrequency: 0 and set it to 30 or 60

More info here: http://answers.unity3d.com/questions/894979/inputaccelerometer-always-returning-zero.html

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

23 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

Related Questions

Please, can anyone explain this (input.acceleration) 3 Answers

Detect if an acceleration sensor exist 1 Answer

Incremental acceleration with Imput 1 Answer

Detect phone sliding movement across table 0 Answers

Detection of device fall 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