У нас вы можете посмотреть бесплатно Using the Gyroscope on a Mobile Device (Android) in Unity или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
In this video, you'll learn how to access the gyroscope on an Android device using unity. No permissions are required, but a line of code is necessary to start reading gyroscope data. Here is the code: using UnityEngine; public class Gyroscope : MonoBehaviour { private void Start() { if (SystemInfo.supportsGyroscope) { Input.gyro.enabled = true; } } // Update is called once per frame void Update() { if (SystemInfo.supportsGyroscope) transform.rotation = GyroToUnity(Input.gyro.attitude); } private Quaternion GyroToUnity (Quaternion q) { return new Quaternion(q.x, q.y, -q.z, -q.w); } }