2026-04-03 상호작용 버그 수정
This commit is contained in:
@@ -432,9 +432,16 @@ private void JumpAction()
|
||||
#region 앉기
|
||||
public void PointSitAction(Transform trn)
|
||||
{
|
||||
_cController.enabled = false;
|
||||
_moveInput = Vector2.zero;
|
||||
_moveTargetDir = Vector3.zero;
|
||||
_currentSpd = 0f;
|
||||
_actionExitRequested = false;
|
||||
|
||||
_stateMachine.ChangeState(PlayerState.Action);
|
||||
_anim.SetFloat("speedRatio", 0f);
|
||||
_anim.SetFloat("DirectX", 0f);
|
||||
_anim.SetFloat("DirectY", 0f);
|
||||
|
||||
_cController.enabled = false;
|
||||
|
||||
transform.position = trn.position;
|
||||
transform.rotation = trn.rotation;
|
||||
@@ -442,6 +449,18 @@ public void PointSitAction(Transform trn)
|
||||
_cController.enabled = true;
|
||||
|
||||
_anim.SetBool("IsSit",true);
|
||||
|
||||
RotationMode = PlayerRotationMode.CameraDecoupled;
|
||||
|
||||
float freezeTime = 3f;
|
||||
|
||||
_stateMachine.ChangeState(PlayerState.Trans);
|
||||
|
||||
_moveCutTimer = freezeTime;
|
||||
// 앉기 진입 애니메이션 길이에 맞게 조정
|
||||
_ = Util.RunDelayed(freezeTime, () => {
|
||||
_stateMachine.ChangeState(PlayerState.Action);
|
||||
}, default);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -451,12 +470,12 @@ public void EndAction()
|
||||
if (_stateMachine.CurrentState != PlayerState.Action) return;
|
||||
|
||||
_anim.SetBool("IsSit", false);
|
||||
float FreezeTime = 2f;
|
||||
float freezeTime = 2f;
|
||||
|
||||
_stateMachine.ChangeState(PlayerState.Trans);
|
||||
|
||||
_moveCutTimer = FreezeTime;
|
||||
_ = Util.RunDelayed(FreezeTime, () => {
|
||||
_moveCutTimer = freezeTime;
|
||||
_ = Util.RunDelayed(freezeTime, () => {
|
||||
_stateMachine.ChangeState(PlayerState.Idle);
|
||||
RotationMode = PlayerRotationMode.CameraCoupled;
|
||||
InteractionOnTarget.InteractEnd(this);
|
||||
@@ -590,12 +609,11 @@ public void AimToggleInput(InputState inputState)
|
||||
public void InteractInput()
|
||||
{
|
||||
if (ActionExitCheck()) return;
|
||||
if (_stateMachine.CurrentState == PlayerState.Trans) return;
|
||||
|
||||
if (InteractionTargets.Count > 0)
|
||||
{
|
||||
InteractionOnTarget.InteractExec(this); // 실제 상호작용 실행
|
||||
|
||||
RotationMode = PlayerRotationMode.CameraDecoupled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user