I’m using a line trace to detect if an enemy is in the line of sight of the player, however, it hits the enemy even when it’s away from them. It continues to trigger way above the player and to the sides as well. I can’t figure out why it’s triggering a hit here.
This is my code for the line cast. I’m simply checking if it is the enemy. It works, so when I’m not looking at the enemy it doesn’t hit anything, but it hits the enemy in a wider radius than it should