If I were to do an if(Physics.Raycast) and make the distance infinite, would that be bad. WOuld it have a heavy performance cost.

Hello,

Raycasting is simply intersecting a “ray” with every single collider in the scene. Wether that be sphere or mesh colliders, it’s the same concept. The maximum distance simply checks whether the point already found, is within range. There is no change in speed at all :slight_smile:

Distance checking is done after intersection testing. It can’t be done before.

If you want to do some research in this area, simply search for “ray-triangle intersection testing” :wink:

Hope this helps,
Benproductions1