diff options
Diffstat (limited to 'Assets/Scripts/Controllers/AIController.cs')
-rw-r--r-- | Assets/Scripts/Controllers/AIController.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Assets/Scripts/Controllers/AIController.cs b/Assets/Scripts/Controllers/AIController.cs index f897f42..244b502 100644 --- a/Assets/Scripts/Controllers/AIController.cs +++ b/Assets/Scripts/Controllers/AIController.cs @@ -53,7 +53,7 @@ namespace Controllers if (!game.enemy.HasBall) // Move towards the ball to grab it. { - if (Vector2.Distance(player.root.transform.position, transform.position) < 2f) // Repel from the player if they get too close. + if (Vector2.Distance(player.root.transform.position, transform.position) < 0.8f) // Repel from the player if they get too close. { // transform.position += new Vector3(-(player.transform.position - transform.position).normalized.x, 0, 0) * (Time.deltaTime * speed / 2f); transform.position = new Vector2(Vector2.MoveTowards(transform.position, player.root.transform.position, -1.5f * speed * Time.deltaTime).x, transform.position.y); |