Is there a maximum raycast distance? Will longer raycasts (about 30,000-100,000 studs) impact game performance?
yes, there’s a maximium, but you can raycast multiple times at the last one, but pretty sure it can lag though, why you need such bigs raycast
I’m creating a rangefinder for a naval game, the map is about 20480 studs^2 so the distances are very large.
for rangefinding in between the ships i’d reccomend simply doing:
For rangefinding the land it’s going to get slighty painful, as you’ll have to connect multiple raycasts.
Also, what is the maximum raycast distance? Can I get a number?
Now, I reckon that it is probably just going to crash so it could be infinite.
An extremely large raycast distance is an edge case so it wouldn’t even be thought of because no one is going to need such long rays. If you find a situation where you think of using really long rays, you might be using raycasts incorrectly or math is recommended to be used instead.
The maximum raycast distance is 5000 studs.