标签:
angle += state.ThumbSticks.Left.Y * 25.0f * Time.deltaTime;//俯仰角
var kk = Mathf.Clamp(angle, -30, 30);
Quaternion _kk = new Quaternion();
_kk = Quaternion.AngleAxis(kk, Vector3.left);//上下旋转
angle2 += state.ThumbSticks.Left.X * 25.0f * Time.deltaTime;//俯仰角
Quaternion _kk2 = new Quaternion();
_kk2 = Quaternion.AngleAxis(angle2, Vector3.up);//左右旋转
var gg = _kk * originRotation;
My.transform.localRotation = _kk2 * gg;
标签:
原文地址:http://www.cnblogs.com/Study02/p/5549145.html