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
Comments (1)
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
- SearchExpression strips quotes
- dSYM file is not created during macOS standalone build
- Project Settings panels disappear and do not repaint when entering Play Mode without reloading Domain
- Screen Space Decals ignore Rendering Layer Mask when using OpenGL Graphics API
- Crash on scripting_method_invoke when the Player is build before entering the Play mode in the Editor
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.