I've found this snippet. As far as I understand it could be used here.When the cutscene starts you should first disable input using OnEnableGameplayInput, and from there treat the character as an AI agent.
private void OnEnableGameplayInput(bool enable)
{
// Force stop the ability if the character no longer has input.
if (!enable && IsActive) {
StopAbility(true);
}
}
m_Ride.CharacterLocomotion.ManualMove = true;
var playerInput = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Input.PlayerInput>();
playerInput.enabled = false;
var handler = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler>();
handler.enabled = false;
var localLookSource = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Character.LocalLookSource>();
localLookSource.enabled = true;
That is for creating your own ability, which you shouldn't need to do.I've found this snippet. As far as I understand it could be used here.
C#:private void OnEnableGameplayInput(bool enable) { // Force stop the ability if the character no longer has input. if (!enable && IsActive) { StopAbility(true); } }
Also, is this one uselful here as well?
C#:m_Ride.CharacterLocomotion.ManualMove = true;
Yes, that will switch the input. Although by sending the OnEnableGameplayInput event you should get similar results.Also, another example from the SwtichCharacters snippet. Is it a proper one?
C#:var playerInput = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Input.PlayerInput>(); playerInput.enabled = false; var handler = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler>(); handler.enabled = false; var localLookSource = prevCharacter.GetComponent<Opsive.UltimateCharacterController.Character.LocalLookSource>(); localLookSource.enabled = true;