A strange error.

ttesjt

New member
The error I experienced looks a little bit similar to this post.

This is the behavior:
The camera suddenly stop moving. (It doesn't move, does not rotate.)
The character will still response to the inputs.

The trigger to this error is still unknown. This bug happens around once per two days. Seemingly pretty random to me. When this happens, I have to reload the scene to fix.

The line:
"transform.position assign attempt for 'Main Camera' is not valid. Input position is { NaN, NaN, NaN }."
is particularly interesting to me.


This is what console says:
UnityEngine.Rigidbody:MovePosition (UnityEngine.Vector3)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:ApplyPosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:1442)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:ApplyPosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:710)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:UpdateCharacter () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:515)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateCharacter () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:565)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:Move (single,single,single) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:479)
Opsive.UltimateCharacterController.SimulationManager/CharacterComponents:Move () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:55)
Opsive.UltimateCharacterController.SimulationManager:MoveCharacters () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:259)
Opsive.UltimateCharacterController.SimulationManager:FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:228)

transform.position assign attempt for 'Main Camera' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Transform:set_position (UnityEngine.Vector3)
Opsive.UltimateCharacterController.Camera.CameraController:Move (single,single) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:564)
Opsive.UltimateCharacterController.SimulationManager/CameraComponents:Move () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:90)
Opsive.UltimateCharacterController.SimulationManager:MoveCameras () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:269)
Opsive.UltimateCharacterController.SimulationManager:FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:230)


Screenshot (33).png

I should take a full screen shot. I forgot.


Thank you so much for looking into this error. I will be looking into it as well!
 
Hmm, are you able to consistently reproduce that error so I can take a closer look at the cause? I'm not sure just based on the stack trace.

The next update that goes out does make some camera related logic changes so before trying too hard I would first wait for that update because it might solve itself.
 
awesome. No I am not able to reproduce the error consistently. It so far happens pretty randomly. (Super rarely too). I will wait for the update. So exciting for it!
 
Top