This commit is contained in:
Bragin Stepan
2026-03-06 21:03:33 +05:00
parent d3dce07cf5
commit ffeb1655c8
4 changed files with 8 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.Systems
private void OnEndTeleport()
{
if (_radius <= 0 || _damage <= 0) return;
if (_radius <= 0 || _damage <= 0)
return;
int count = Physics.OverlapSphereNonAlloc(
_toPoint.position,

View File

@@ -44,6 +44,7 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.Systems
private Vector3 GetRandomPointInRadius(Vector3 center, float radius)
{
Vector2 randomPoint = Random.insideUnitCircle * radius;
return center + new Vector3(randomPoint.x, 0f, randomPoint.y);
}
}