Search Issue Tracker
Fixed
Votes
0
Found in
5.0.0b14
Issue ID
651362
Regression
No
FirstPersonController movement doesn't work, script throws not valid localRotation error
1. Create any project
2. Add Standard Assets Utility, Characters
3. Add prefab FPSController
4. Play the scene
5. You are going to get error "transform.localRotation assign attempt for 'FirstPersonCharacter' is not valid. Input rotation is { NaN, NaN, NaN, NaN }."
I assume you forgot to:
FirstPersonController.cs
private void RotateView()
{
m_MouseLook.LookRotation (transform, m_Camera.transform);
//was MouseLook.LookRotation (transform, m_Camera.transform);
m_CameraRefocus.GetFocusPoint();
}
MouseLook.cs
private void Start()
{
m_CharacterController = GetComponent<CharacterController>();
m_Camera = Camera.main;
m_OriginalCameraPosition = m_Camera.transform.localPosition;
m_CameraRefocus = new CameraRefocus(m_Camera, transform, m_Camera.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<AudioSource>();
m_MouseLook.Init (transform, m_Camera.transform);
//was whitout m_MouseLook.Init,
//because u were multiplying quat by zero
}
Any way, movement also isn't working.
Reproduced: 5.0.0b15
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
inbeatable0101
Jul 26, 2019 06:57
online gaming improves many skills more especially. When taking chances or decisions instantly, https://heartsgameonline.net this enhances the ability of the player to make good choices.