Raycast is triggering from very far away

I have an enemy game object with raycasts coming from the left and right side of its body. The origin points are just the localPosition of the enemy. I have drawn some Debug.Drawrays with the same specifications as my raycasts and they look normal to me - they originate at the center of the enemy and extend just beyond the enemy’s collider. However, it detects collision with the player from MUCH further away than it should and it does NOT detect collision when the player is right next to the enemy. This leads me to believe that for whatever reason the raycasts are NOT originating from the correct place like the DrawRays show that it should, but I have no idea why that would be? The enemy raycasts correctly below itself and correctly raycasts into walls (to reverse direction), but for some reason the raycast for player detection is way out of whack.

@lanebryer i think we need some code bud, the only thing i can think of with the info you provided is maybe the ray is colliding with the enemies own colliders, as you are spawning the rays from the center then out try this, turn of enemy colliders only leave the raycast.

maybe the ray is on the wrong layer as you are saying nothing happens when the player is close.

Have you checked the name(col.gameobject.name) of the object the ray is colliding with ? It is to hard to really isolate the problem with only what you are telling us.