wizard
New member
I believe that this is fixed in the version being released shortly. At least it was for one project that I tested. This related to the script execution order - the SpawnManagerBase should execute before the KinematicObjectManager.
Still presented for me in 2.2.3.
This is how I reproduce it now during cutscenes playing.
When a cutscene is started I run this code:
C#:
Opsive.Shared.Events.EventHandler.ExecuteEvent(m_Character, "OnEnableGameplayInput", false);
var CharacterLocomotion = m_Character.GetCachedComponent<UltimateCharacterLocomotion>();
m_LookSource = CharacterLocomotion.LookSource;
print("Look source: " + m_LookSource);
var m_localLookSource = m_Character.GetComponent<Opsive.UltimateCharacterController.Character.LocalLookSource>();
m_localLookSource.enabled = true;
So the character cannot be controlled and its look source is fixed.
The print log is
Look source: Main Camera (Opsive.UltimateCharacterController.Camera.CameraController)
Once a cutscene is finished I run this code:
C#:
Opsive.Shared.Events.EventHandler.ExecuteEvent(m_Character, "OnEnableGameplayInput", true);
var m_localLookSource = m_Character.GetComponent<Opsive.UltimateCharacterController.Character.LocalLookSource>();
m_localLookSource.enabled = false;
var CharacterLocomotion = m_Character.GetCachedComponent<UltimateCharacterLocomotion>();
m_LookSource = CharacterLocomotion.LookSource;
print("Look source after: " + m_LookSource);
The print log is with the empty look source
Look source after:
and so the error appears.
Am I doing it wrong?