예제 #1
0
        public static void doDone(TurningAction actionObject)
        {
            ActorView entity = SceneViews.instance.getCurFBScene().getActor(actionObject.objectID);

            Quaternion end = Quaternion.LookRotation(new Vector3(actionObject.endDirection.x, 0, actionObject.endDirection.y));

            entity.setRotation(end);
        }
예제 #2
0
        public static void doProgress(TurningAction actionObject, float progress)
        {
            if (actionObject.ignoreTimeAction)
            {
                return;
            }

            ActorView entity = SceneViews.instance.getCurFBScene().getActor(actionObject.objectID);

            Quaternion start = Quaternion.LookRotation(new Vector3(actionObject.startDirection.x, 0, actionObject.startDirection.y));
            Quaternion end   = Quaternion.LookRotation(new Vector3(actionObject.endDirection.x, 0, actionObject.endDirection.y));

            //获取本次移动位置
            Quaternion thisEndRotation = getRotatingDirection(start, end, progress);

            entity.setRotation(thisEndRotation);
        }