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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Add comment