- Home /
Question by
AlphaWolf464 · Apr 23, 2019 at 02:35 PM ·
localpositionnan
local Position giving me NaN
I use this code: m_CharacterController = GetComponent(); m_Camera = gameObject.transform.GetChild(0).GetComponent(); m_OriginalCameraPosition = m_Camera.gameObject.transform.localPosition; m_FovKick.Setup(m_Camera); m_HeadBob.Setup(m_Camera, m_StepInterval); m_StepCycle = 0f; m_NextStep = m_StepCycle / 2f; m_Jumping = false; m_AudioSource = GetComponent(); m_MouseLook.Init(transform, m_Camera.transform); } and I get the error transform.localPosition assign attempt for 'FirstPersonCharacter' is not valid. Input localPosition is { NaN, NaN, 0.000000 } I am modifying firstpersoncontroller for my purposes, and this code is from that.
Comment