fix: 플레이어 접촉 이동과 타깃 표면 추적 보정
- TargetSurfaceUtility를 추가해 플레이어와 적의 실제 충돌 표면 기준으로 거리, 방향, 목적지를 계산 - 플레이어 이동과 적 루트모션, 추적 로직에서 접촉 시 수평 이동을 제한해 겹침과 밀어내기 문제를 완화 - 드로그 AI 거리 판정 노드들이 표면 거리 기준을 사용하도록 맞춰 사거리 분기 오차를 줄임
This commit is contained in:
@@ -58,10 +58,9 @@ public partial class SetTargetInRangeAction : Action
|
||||
continue;
|
||||
}
|
||||
|
||||
float distance = Vector3.Distance(
|
||||
float distance = TargetSurfaceUtility.GetHorizontalSurfaceDistance(
|
||||
GameObject.transform.position,
|
||||
potentialTarget.transform.position
|
||||
);
|
||||
potentialTarget);
|
||||
|
||||
if (distance < nearestDistance)
|
||||
{
|
||||
@@ -79,4 +78,3 @@ public partial class SetTargetInRangeAction : Action
|
||||
return Status.Success;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user