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
- Scene view audio toggle doesn't work after disabling and enabling audio source component with audio random container
- Pitch changes while paused messes up scheduling of the audio random container
- Crash on detail::ComputeShaderSnippetKey when entering the Play mode
- Unable to interact with Material Inspector window when creating a new Material and renaming it
- Shadow artifact is cast onto GameObjects in the Scene view when the Scene view lighting is disabled
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.