鸟语天空
Mathf.DeltaAngle()
post by:追风剑情 2017-7-27 16:02

计算当前角度转到目标角度的最小旋转角度

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        Debug.Log(Mathf.DeltaAngle(1080, 90));
        Debug.Log(Mathf.DeltaAngle(180, 720));
    }
}

运行测试

111111.png

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容