Unity技术分享Unity教程合集

判断旋转方向

2016-03-09  本文已影响106人  影子丢了
        public static bool RotationDirection(Vector3 currentDir, Vector3 previousDir)
        {
            if (Vector3.Cross(currentDir, previousDir).z > 0)
            {
                //顺时针
                return true;
            }
            else
            {
                //逆时针
                return false;
            }
        }
上一篇 下一篇

猜你喜欢

热点阅读