private void DoBoundaryBehavior() { bool isOutOfBounds = !steering.CheckBounds(); if (isOutOfBounds) { isAvoiding = true; steering.Seek(SceneManager.Instance.worldCenter, 0.0f); } else if (isAvoiding) { // not out of bounds isAvoiding = false; steering.SetWanderAngle(SceneManager.Instance.worldCenter); } }