diff --git a/BlueWater/Assets/02.Scripts/Character/CombatPlayer/CombatPlayerController.cs b/BlueWater/Assets/02.Scripts/Character/CombatPlayer/CombatPlayerController.cs index 102ba2073..75b857b6e 100644 --- a/BlueWater/Assets/02.Scripts/Character/CombatPlayer/CombatPlayerController.cs +++ b/BlueWater/Assets/02.Scripts/Character/CombatPlayer/CombatPlayerController.cs @@ -97,7 +97,7 @@ namespace BlueWaterProject /*********************************************************************** * Unity Events - ***********************************************************************/ + ***************************************************************m********/ #region Unity Events private void OnEnable() diff --git a/BlueWater/Assets/02.Scripts/Character/CombatPlayer/StateMachines/TheWaltzOfTheSwordBehavior.cs b/BlueWater/Assets/02.Scripts/Character/CombatPlayer/StateMachines/TheWaltzOfTheSwordBehavior.cs index 83e8e67d0..821cbef3c 100644 --- a/BlueWater/Assets/02.Scripts/Character/CombatPlayer/StateMachines/TheWaltzOfTheSwordBehavior.cs +++ b/BlueWater/Assets/02.Scripts/Character/CombatPlayer/StateMachines/TheWaltzOfTheSwordBehavior.cs @@ -40,8 +40,12 @@ namespace BlueWaterProject var animationLength = stateInfo.length; animator.speed = animationLength / theWaltzOfTheSword.skillDuration; - intervalTime = stateInfo.length / 6f; - + intervalTime = animationLength / 6f; + + if (!theWaltzOfTheSword.isMovingCamera) + { + CameraManager.Inst.CombatCamera.SetFollow(null); + } combatPlayerController.SetUseGravity(false); combatPlayerController.SetIsTrigger(true); combatPlayerController.SetIsInvincibility(true); @@ -85,6 +89,11 @@ namespace BlueWaterProject { combatPlayerController.Move(theWaltzOfTheSword.SkillInputData.startPosition); } + if (!theWaltzOfTheSword.isMovingCamera) + { + var userTransform = theWaltzOfTheSword.SkillInputData.playerCollider.transform; + CameraManager.Inst.CombatCamera.SetFollow(userTransform); + } combatPlayerController.SetIsTrigger(false); combatPlayerController.SetUseGravity(true); diff --git a/BlueWater/Assets/02.Scripts/CombatCamera.cs b/BlueWater/Assets/02.Scripts/CombatCamera.cs index be7e77f53..31ef76455 100644 --- a/BlueWater/Assets/02.Scripts/CombatCamera.cs +++ b/BlueWater/Assets/02.Scripts/CombatCamera.cs @@ -61,5 +61,10 @@ namespace BlueWaterProject CameraManager.Inst.MainCam = Camera.main; } + + public void SetFollow(Transform target) + { + BaseCombatCamera.Follow = target; + } } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/NewSkill/Type/TheWaltzOfTheSword.cs b/BlueWater/Assets/02.Scripts/NewSkill/Type/TheWaltzOfTheSword.cs index 262b7ff8b..4b8d0ac2f 100644 --- a/BlueWater/Assets/02.Scripts/NewSkill/Type/TheWaltzOfTheSword.cs +++ b/BlueWater/Assets/02.Scripts/NewSkill/Type/TheWaltzOfTheSword.cs @@ -12,6 +12,7 @@ namespace BlueWaterProject public bool isHitStop = true; [ShowIf("@isHitStop")] public float hitStopDuration = 0.3f; + public bool isMovingCamera = true; public ParticleSystem readyEffect; public ParticleSystem hitEffect; diff --git a/BlueWater/Assets/05.Prefabs/Skills/CombatPlayer/TheWaltzOfTheSword.prefab b/BlueWater/Assets/05.Prefabs/Skills/CombatPlayer/TheWaltzOfTheSword.prefab index 9a02f498b..9956201c4 100644 --- a/BlueWater/Assets/05.Prefabs/Skills/CombatPlayer/TheWaltzOfTheSword.prefab +++ b/BlueWater/Assets/05.Prefabs/Skills/CombatPlayer/TheWaltzOfTheSword.prefab @@ -63,6 +63,7 @@ MonoBehaviour: returnToStartPosition: 0 isHitStop: 1 hitStopDuration: 0.3 + isMovingCamera: 0 readyEffect: {fileID: 6066371733532865879, guid: 450f830fa8320cd46b7bc9aeb6e796b4, type: 3} hitEffect: {fileID: 6909896828301235070, guid: b1ca28b8904fe0f4484fdb06b8c55086,