RayCaster Intersection Range

Hii,
I have used raycaster in my project, it is a new concept for me,and it works fine,the problem is that it only detects the objects when cursor is very close to the object.Can we set the range of raycaster so that we can detect the object from a far distance which is not to close.

Thanks,
Akshay

This thread looks similar to what you’re asking about.

You can’t do this directly as far as I know. However, you can probably do something like create a big invisible box with your object inside, and check intersection against that instead.