"Unity practical Skills" Unity3d gyroscope controls camera move rotation

Source: Internet
Author: User
Https://docs.unity3d.com/ScriptReference/Gyroscope.html

Unity's official documentation is clear, with only one point to note:

All tutorials teach you how to use

input.gyro.attitude

But this represents the position in space, first of all you want to do like the glory of the king to shake the camera effect, you need to record the last position, each subtraction to get the offset value.

The bigger problem is that the spatial value may suddenly turn negative.

So it's not really good to use.

Recommended for

m_gyro.rotationRateUnbiased

This will give you a direct offset, that's enough.

"Unity practical Skills" Unity3d gyroscope controls camera move rotation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.