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 Cyberuben · Sep 12, 2014 at 12:03 PM · rotationgyroscopemotion

Get rotation vector depending on phone's forward vector

Hi,

I'm currently working on a mobile game and I'm trying to get the phone's rotation around the axis from the bottom to the top of the phone. Our game will most likely be played in Portrait mode, so I do not have to worry about the phone's orientation.

Currently I'm using the gyroscope in my phone but I have been told that far from all phones have one, and I'm wondering what the best solution would be.

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 VesuvianPrime · Sep 12, 2014 at 11:45 AM 0
Share

Are you asking how to use gyroscope on phones that dont have a gyroscope?

avatar image Cyberuben · Sep 12, 2014 at 11:53 AM 0
Share

I'm not even sure if I should be using the gyroscope for what I am trying to achieve. The player of our game should be able to move the player by tilting their device left and right while in portrait mode. I first thought I'd use the gyroscope for that, but maybe I need the accelerometer?

avatar image VesuvianPrime · Sep 12, 2014 at 12:05 PM 0
Share

No I think you're right about using the gyroscope. Accelerometers are used for measuring g-force, gyroscopes let you measure angular change.

avatar image Cyberuben · Sep 12, 2014 at 12:11 PM 0
Share

But how do games that require you to move your device to play the game work on cheaper phones that do not have a gyroscope then? I'm quite sure my gyroscope always shows the rotation in world space, never local space. If I point my device to the north, my Z rotation is 0, if I point it south, it is 180. I can't use either X or Y because they change depending on how much you rotate your device on the Z axis.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

3rd player orientation using gyro with offset 0 Answers

Gyro Sensor based on Euler angles? 0 Answers

Unity 3d Phone Direction? 0 Answers

How to create a circular motion using circular equation along with rotation of object? 0 Answers

Gyroscope Gimbal Lock 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