You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Input Released Trigger does not fire in UE5.5. Affects gameplay ability WaitInputRelease node.
Solution available from Lyra5.5 project, have not tested replication:
void UCustomGameplayAbility::HandleInputReleasedEvent(const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilitySpecHandle SpecHandle)
{
// Find the Ability Spec based on the passed in information and set a reference.
if (FGameplayAbilitySpec* Spec = ActorInfo->AbilitySystemComponent->FindAbilitySpecFromHandle(SpecHandle))
{
if (UAbilitySystemComponent* AbilitySystemComponent = ActorInfo->AbilitySystemComponent.Get())
{
Spec->InputPressed = false;
if (Spec && Spec->IsActive())
{
// Lyra 5.5 Solution
PRAGMA_DISABLE_DEPRECATION_WARNINGS
const UGameplayAbility* Instance = Spec->GetPrimaryInstance();
FPredictionKey OriginalPredictionKey = Instance ? Instance->GetCurrentActivationInfo().GetActivationPredictionKey() : Spec->ActivationInfo.GetActivationPredictionKey();
PRAGMA_ENABLE_DEPRECATION_WARNINGS
// Invoke the InputReleased event. This is not replicated here. If someone is listening, they may replicate the InputReleased event to the server.
AbilitySystemComponent->InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputReleased, SpecHandle, OriginalPredictionKey);
/* Original Method
if (Spec->Ability.Get()->bReplicateInputDirectly && AbilitySystemComponent->IsOwnerActorAuthoritative() == false)
{
AbilitySystemComponent->ServerSetInputReleased(SpecHandle);
}
AbilitySystemComponent->AbilitySpecInputReleased(*Spec);
// Invoke the InputReleased event. This is not replicated here. If someone is listening, they may replicate the InputPressed event to the server.
AbilitySystemComponent->InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputReleased, SpecHandle, Spec->ActivationInfo.GetActivationPredictionKey());
*/
}
}
}
}
The text was updated successfully, but these errors were encountered:
Input Released Trigger does not fire in UE5.5. Affects gameplay ability WaitInputRelease node.
Solution available from Lyra5.5 project, have not tested replication:
The text was updated successfully, but these errors were encountered: