I have stumbled upon two little mistakes in the documentation:
First is:
“if (Physics.Raycast(ray, hit))” should be "if (Physics.Raycast(ray, out hit)) "
And second is that the C# example is a Java Script example and the other way around.
I have stumbled upon two little mistakes in the documentation:
First is:
“if (Physics.Raycast(ray, hit))” should be "if (Physics.Raycast(ray, out hit)) "
And second is that the C# example is a Java Script example and the other way around.
Thanks for the heads up! We’ll fix this as soon as possible.