Raycast Auto Approximation

Hi again. I am curious. I am working on this gun model and script i have, and it now all functions properly, but theres one thing i dont like about how well it functions. When i am right in the face of an object and cant possible be out of shot, i hit no problem with the weapon, but if i am off slightly in the distance and just barely overshoot it seems, the hit entirely misses or seems to only register a grazing hit every second or so. This is on an automatic weapon , fires fairly quickly.

What i would like to know, is if theres a simple way to achieve an auto approximate value of where the ray cast is hitting. As im writing this even im pondering that there must NOT be a way to do this with the collider, because to use the collider at all means contact must be made. Is there maybe another way of achieving this.?

Physics.SphereCast and Physics.CapsuleCast does the same thing as Physics.Raycast, except that they cast an actual shape rather than just a ray.

Again, saved by Dreamblur, thanks alot :stuck_out_tongue: