- Home /
Scene::raycastAnyShape: The maximum distance must be greater than zero!
Hello,
I developed a car park game. Finished it with three level it works well while running on the unity. However when I build it the car didn't go and music also didn't start. When I run exe file with full screan mode there were multiple errors saying that: Scene::raycastAnyShape: The maximum distance must be greater than zero!.
I couldn't find any solution to that and coludn't understand what does it mean.
Anyone can help?
Answer by Statement · May 30, 2013 at 12:10 PM
Maybe you got a lens flare attached to the camera or an inverted scale on your camera?
As for why some piece of code doesn't work, try attaching the debugger and figure out what is going wrong. It's impossible to tell what's going wrong based on your description alone, but knowing/learning how to use the debugger is invaluable in terms of self help. Plus it can be pretty fun if you're new to it.
Answer by TheKingOfTheRoad · Jul 16, 2013 at 03:58 AM
I found that this error in the CarCamera.js component, has to be the global Z of the camera on negative values.
Your answer
![](https://koobas.hobune.stream/wayback/20220613103209im_/https://answers.unity.com/themes/thub/images/avi.jpg)