Fix issue with berries going off screen when using anti berry

This commit is contained in:
2025-09-04 19:30:23 -07:00
parent 0d754b9af9
commit 36078293ae

View File

@@ -259,6 +259,7 @@ public class GamePlayer : MonoBehaviour
if (dir.magnitude < 3f) if (dir.magnitude < 3f)
{ {
berry.GetComponent<Rigidbody2D>().linearVelocity = dir.normalized * 5f; berry.GetComponent<Rigidbody2D>().linearVelocity = dir.normalized * 5f;
ClampPosition(berry);
} }
} }
} }