示例#1
0
        void MatchRotation()
        {
            var cameraController = Facade.GetController <CameraController>(c => c.ControllerName == cameraControllerName);

            if (cameraController == null)
            {
                Utility.Debug.LogInfo("cameraController empty", MessageColor.RED);
                return;
            }
            Vector3 cameraForward = cameraController.transform.forward;

            cameraForward.y = 0;
            cameraForward.Normalize();
            dot = Vector3.Dot(transform.forward, cameraForward);
            Debug.DrawLine(transform.position, transform.position + cameraForward, Color.red, 0.2f);
        }