According to the AR Foundation Manual, “Ray casting allows you to determine where a ray intersects with a…