Exemple #1
0
        private void Look()
        {
            var cameraRay = _playerCamera.ScreenPointToRay(Input.mousePosition);

            if (_groundPlane.Raycast(cameraRay, out var rayLength))
            {
                var pointToLook = cameraRay.GetPoint(rayLength);
                _playerMover.Rotate(Utils.GetAngleBetweenVectors(pointToLook, transform.position));
            }
        }
 public void Execute()
 {
     mover.Rotate(dx, dy);
 }