赞
踩
Unity自带陀螺仪功能,今天就利用陀螺仪实现一个VR相机功能。步骤如下:
- using UnityEngine;
- using System.Collections;
-
- public class GyroController : MonoBehaviour
- {
- // Fields
- private readonly Quaternion baseIdentity = Quaternion.Euler(90f, 0f, 0f);
- private Quaternion baseOrientation = Quaternion.Euler(90f, 0f, 0f);
- private Quaternion baseOrientationRotationFix = Quaternion.identity;
- private Quaternion calibration = Quaternion.identity;
- p
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。