Look Rotation Viewing Vector Issue

zroc

Member
Justin,

Having an issue I'm trying to sort out. Have had this since whenever, but need to reconcile it and coming up blank right now.. Any assistance would be appreciative.

Start my Multiplayer Game and host loads in and spawns (loads in from Main Menu (lobby) and then into single scene as main room). Then I launch another instance of game in separate window as player 2(or 3....). As soon as the 2nd player or more are assigned into the hosts room/scene I get this console message that just continue to spam the console:

Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3)
Opsive.UltimateCharacterController.Character.CharacterIK:GetDefaultLookAtPosition () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterIK.cs:395)
Opsive.UltimateCharacterController.Character.CharacterIK:LookAtTarget () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterIK.cs:777)
Opsive.UltimateCharacterController.Character.CharacterIK:OnAnimatorIK (int) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterIK.cs:611)

I've traced it back line for line and the message is coming from Unity not UCC, but trying to figure out while the look rotation is coming back as a vector.zero value.
 
It looks like the look source could be getting reset. Can you tell me how to reproduce the error within a fresh project?
 
It looks like the look source could be getting reset. Can you tell me how to reproduce the error within a fresh project?
Umm.. No, unfortunately I can not tell you how to reproduce in a fresh project. It's def tied to the look source as you stated, but only when the 2nd or more players joins. In do further testing it begins as soon as the host instantiates the character. So the client is not yet loaded in completely and/or spawned, but the host has the character on their end waiting for the client to spawn. Wondering if the look source of the host is conflicting with the client and then it just looses it value. If it matters, I've always gotten that "No Look source error":
Code:
Error: There is no look source attached to the character z_HFemale_v1.4_ucc2.3.4(Clone). Ensure the character has a look source attached. For player characters the look source is the Camera Controller, and AI agents use the Local Look Source.
0x00007FF7C283371C (Unity) StackWalker::GetCurrentCallstack
0x00007FF7C28376D1 (Unity) StackWalker::ShowCallstack
0x00007FF7C0EBE4D5 (Unity) GetStacktrace
0x00007FF7C34C939E (Unity) DebugStringToFile
0x00007FF7C2892D21 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x00000291BE21300B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x00000291BE212E8B (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x00000291BE21248E (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x00000291CBE23C4A (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x00000291CBE237CB (Mono JIT Code) [Combat.cs:32] Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes.Combat:GetDeltaYawRotation (single,single,single,single) 
0x00000291CBE23274 (Mono JIT Code) [UltimateCharacterLocomotionHandler.cs:200] Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:GetDeltaYawRotation () 
0x00000291CBE22DE3 (Mono JIT Code) [KinematicObjectManager.cs:234] Opsive.UltimateCharacterController.Game.KinematicObjectManager/KinematicCharacter:Move (bool) 
0x00000291CBE226BB (Mono JIT Code) [KinematicObjectManager.cs:886] Opsive.UltimateCharacterController.Game.KinematicObjectManager:FixedUpdate () 
0x00000291C4CA4478 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FF859A1E270 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke 
0x00007FF8599A2AE2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke 
0x00007FF8599ABB3F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke 
0x00007FF7C27A589E (Unity) scripting_method_invoke
0x00007FF7C279F75D (Unity) ScriptingInvocation::Invoke
0x00007FF7C2768E84 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007FF7C2768F96 (Unity) MonoBehaviour::CallUpdateMethod
0x00007FF7C1DF97F8 (Unity) BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>
0x00007FF7C1E02794 (Unity) FixedBehaviourManager::Update
0x00007FF7C2240F0C (Unity) `InitPlayerLoopCallbacks'::`2'::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward
0x00007FF7C222ACE8 (Unity) ExecutePlayerLoop
0x00007FF7C222ADBD (Unity) ExecutePlayerLoop
0x00007FF7C223004C (Unity) PlayerLoop
0x00007FF7C05552EC (Unity) PlayerLoopController::UpdateScene
0x00007FF7C0553288 (Unity) Application::TickTimer
0x00007FF7C0EE3EE5 (Unity) MainMessageLoop
0x00007FF7C0EEE0C8 (Unity) WinMain
0x00007FF7C3F8F262 (Unity) __scrt_common_main_seh
0x00007FF8E4C07034 (KERNEL32) BaseThreadInitThunk
0x00007FF8E4D42651 (ntdll) RtlUserThreadStart
I've gotten this error on every version of UCC using even Nolan as the character, duplicated from Pun Demo Scene into my scene(s). The error goes away and all is functional as I believe the look source is being used before it's actually attached to the character(s). I haven't really debugged this as I stated it's functional, but might be time to dig deeper now as it looks like it could be the culprit of a domino effect.

I know I haven't given you much here in terms of a response and will continue to debug, but if something sticks out in you head, please shout man! Both of these, especially the spamming of the console and log of original thread issue is killing me.. Thx!
 
I haven't really debugged this as I stated it's functional, but might be time to dig deeper now as it looks like it could be the culprit of a domino effect.
I definitely would dig into that first. This thread has some debugging tips:

 
Top