Is there a way to see if a vector3 point lies within a collision object? I currently am using physics.raycast to determine the closest point on an enemy collision object. However, I want to test to see if this point actually intersects the collision object of the enemy prior to enabling firing upon the enemy. See the below image for explanation:
In the picture above, the raycast is hitting a wall in front of the enemy instance. I would like to detect this by checking the point the ray hits against the collision object to determine a “hit.”
Any suggestions?