- Home /
Input rotation is { NaN, NaN, NaN, NaN }
Hi,
I'm checking the value for infinity, or nan. But still getting NaN error.
if(float.IsNaN(value1) || float.IsNaN(value2) || float.IsInfinity(value1) || float.IsInfinity(value2))
return;
These values are used in rotation of a gameobject. I'm not getting this error on my PC over + 50 hours of playing with package. But error depends on which platform do you use the package on i think. Even with checking the float values, throwing same error.
So, i did a example like this. Dividing float1 and float2 values by 0 for NaN value. No errors on my PC. So, checking code is fine. But i don't understand this. This error only shows up in Unity 5. And crashes whole game.
Anyone have an idea?
Thanks...
Your answer
![](https://koobas.hobune.stream/wayback/20220613192016im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity Inspector suddenly shows NaN values 0 Answers
How do I get Unity Remote 5 to work with Moto X Pure? 0 Answers
Problems running from command line 1 Answer
Random get element from a jagged array 1 Answer
Scripts are opening with MonoDevelop instead of Visual Studios.Amongst other things 0 Answers