I am currently writing my own FPS controller and decided to utilize the "MouseLook.cs" for looking around. However, I always get this error whenever I run the game.
transform.localRotation assign attempt for 'Player' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
UnityEngine.Transform:set_localRotation(Quaternion)
UnityStandardAssets.Characters.FirstPerson.MouseLook:LookRotation(Transform, Transform) (at Assets/Scripts/MouseLook.cs:44)
MyFirstPersonController:handleMouseInput() (at Assets/Scripts/MyFirstPersonController.cs:76)
MyFirstPersonController:Update() (at Assets/Scripts/MyFirstPersonController.cs:36)
What does this mean and how do I fix it? I am very confused at this. The game does not crash when I get this error, it just keeps running. Everything else works fine, but the character will not look around. I get this error every time.
I am still new to the Unity Editor and Unity Scripting, in case anyone is wondering.
↧