private void Update_CheckObstacles()
    {
        Collider[] colliders = Physics.OverlapSphere(transform.position, Mathf.Max(stoppingDistance, dynStopDist_WP, dynStopDist_Obs));
        foreach (Collider item in colliders)
        {
            Semaphore_Wrapper sw = item.gameObject.GetComponent <Semaphore_Wrapper>();
            if (sw)
            {
                Semaphore s              = sw.getSemaphore();
                Vector3   v1             = transform.rotation.eulerAngles;
                Vector3   v2             = s.transform.rotation.eulerAngles;
                bool      sameDirection  = HelperFunctions.AngleCloseEnough(v1.y, v2.y, 15);
                bool      behindObstacle = (HelperFunctions.OffsetBetweenTransforms(transform, s.transform).z >= 0);

                if (sameDirection && behindObstacle && !s.isOpen)
                {
                    if (obstacles.IndexOf(s.gameObject) == -1)
                    {
                        obstacles.Add(s.gameObject);
                    }
                    else
                    {
                        obstacles.Remove(s.gameObject);
                    }
                }
            }

            Vehicle vehicle = item.gameObject.GetComponent <Vehicle>();
            if (vehicle && vehicle != this)
            {
                Vector3 v1             = transform.rotation.eulerAngles;
                Vector3 v2             = vehicle.transform.rotation.eulerAngles;
                bool    sameDirection  = HelperFunctions.AngleCloseEnough(v1.y, v2.y, 15);
                bool    behindObstacle = (HelperFunctions.OffsetBetweenTransforms(transform, vehicle.transform).z >= 0);

                if (sameDirection && behindObstacle)
                {
                    if (obstacles.IndexOf(item.gameObject) == -1)
                    {
                        obstacles.Add(item.gameObject);
                    }
                    else
                    {
                        obstacles.Remove(item.gameObject);
                    }
                }
            }
        }
    }