DEG-62 몬스터 폴리싱 #48

Merged
FioreFlower merged 4 commits from DEG-62 into main 2025-05-13 08:18:33 +00:00
2 changed files with 16 additions and 3 deletions
Showing only changes of commit 00fee9d6a2 - Show all commits

Binary file not shown.

View File

@ -51,9 +51,15 @@ public class BulletBase : MonoBehaviour
float moveDist = _speed * Time.deltaTime;
// 1) Raycast 충돌 검사
if (Physics.Raycast(_prevPosition, _direction, out RaycastHit hit, moveDist, _targetLayer))
if (Physics.SphereCast(
_prevPosition,
1,
_direction,
out RaycastHit hit,
moveDist,
_targetLayer
))
{
// 닿은 지점으로 이동
transform.position = hit.point;
OnBulletHit(hit);
return;
@ -85,4 +91,11 @@ public class BulletBase : MonoBehaviour
Debug.Log("## Bullet destroyed");
Destroy(gameObject);
}
// 기즈모로 반지름 시각화
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, 1);
}
}