Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Input rotation is { NaN, NaN, NaN, NaN }. (4.6p1/5.0b16)

Discussion in 'Editor & General Support' started by MrEsquire, Dec 5, 2014.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi,

    It seems that the latest patch release causes some errors on my project build.
    All was working in 4.6, so I'm curious to know what has changed in Patch 1 for 4.6 causing the breakage.

    Error:

    Code (CSharp):
    1. !CompareApproximately (SqrMagnitude (q), 1.0F)
    2. UnityEngine.Transform:Rotate(Vector3)
    3. MobileSkySystem:Update() (at Assets/MobileSkySystem/Scripts/MobileSkySystem.cs:93)
    Code (CSharp):
    1. transform.localRotation assign attempt for 'SunDirectLight' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
    2. UnityEngine.Transform:Rotate(Vector3)
    3. MobileSkySystem:Update() (at Assets/MobileSkySystem/Scripts/MobileSkySystem.cs:93)
    Any ideas what this all means?
     
  2. Warrorar

    Warrorar

    Joined:
    Dec 5, 2014
    Posts:
    2
    i have the same problem with slider bars.

    under the beta version it was going without problems. and since the final release i have always problems with NaN values on the transformation areas.
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    The code I have is from a Asset pack from the store, works perfectly before, therefore I know this is not a coding issue on my side and Unity change that has broken something.
     
  4. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    399
    This is happening for me too in Unity 5 - I don't know what to do to fix it.
     
  5. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Unity 5_0 p2 or f4?
     
  6. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    399
  7. hardsetting_

    hardsetting_

    Joined:
    Nov 16, 2012
    Posts:
    1
    I had the same problem and It turned out that I was actually trying to set the rotation with NaNs.

    Code (csharp):
    1. Debug.Log(this.angle);
    2. transform.localRotation = Quaternion.Euler(0f, 0f, this.angle * Mathf.Rad2Deg);
    3.  
    Adding a debug log before setting the angle allowed me to see what was the angle value that caused the problem.

    Now the problem is finding out where the angle is set to NaN and why in the previous versions of Unity that didn't occur.
     
    ivaylo5ev likes this.