• 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 biellls · Feb 16, 2015 at 01:40 PM · androidgyroscopegyro

Strange android gyrometer attitude angles

I would my device's Input.gyro.attitude.eulerAngle.z to be 0 when my device is neutral (in landscape and perpendicular to the floor with the home button on the left). However, in order for that to happen I currently need to tilt my device approximately 45 degrees.

When my device is in landscape and perpendicular to the floor I get the following values:

 Input.gyro.attitude: x= 3428003428, y=0.1189629, z=0.1253325, w=-0.6925746
 Input.gyro.attitude.eulerAngles: x=70.09518 y=268.4407 z=267.9167

My device is a Nexus 5

Comment
Add comment · Show 3
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 meat5000 ♦ · Feb 16, 2015 at 01:51 PM 0
Share

What happens if you hold your device at a different angle when you start your app?

You may need to recalibrate it. If its not in the options you can do this with a separate app.

avatar image biellls · Feb 16, 2015 at 01:54 PM 0
Share

It makes no difference, I checked. I'm using unity remote 4

avatar image meat5000 ♦ · Feb 16, 2015 at 07:49 PM 1
Share

Ah. I see. Do an actual build and check the values on the device that way, outputting them to OnGUI.

Don't rely on Unity Remote when things look wrong.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by biellls · Oct 17, 2016 at 06:57 PM

@ryo0ka I don't have enough permissions to reply as comment, but if I recall correctly I just stopped using Unity remote like @meat5000 recommended and built it on my phone (Nexus 5) where it worked correctly.

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 elenzil · Oct 17, 2016 at 10:59 PM 0
Share

nice.

you might want to convert meat5000's comment to an 'answer' then. (i think you can do that)

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

How should I interpret the gyro's information? 0 Answers

Using Gyroscope with Android 1 Answer

Input.gyro.attitude not working on newer Android devices 3 Answers

UNITY 3D - Set the start positon of the gyroscope to initial phone position 1 Answer

Android gyroscope 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges