unity 加速计角度
2016-03-02 本文已影响62人
自由的天空
var angleX = Mathf.Atan2(Input.acceleration.z, -Input.acceleration.y)* Mathf.Rad2Deg;
var angleY = Mathf.Atan2(Input.acceleration.x, -Input.acceleration.y) * Mathf.Rad2Deg;
var angleX = Mathf.Atan2(Input.acceleration.z, -Input.acceleration.y)* Mathf.Rad2Deg;
var angleY = Mathf.Atan2(Input.acceleration.x, -Input.acceleration.y) * Mathf.Rad2Deg;