Skip to content
Snippets Groups Projects
Commit ffc1a062 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

fix(interaction): Correctly clears currently interacted components array on interaction end.

parent 952a1ab5
Branches
Tags
1 merge request!85UE5.3-2023.1-rc3
Pipeline #460926 failed
......@@ -120,6 +120,7 @@ void UDirectInteractionComponent::OnBeginInteraction(const FInputActionValue& Va
}
else
{
CurrentlyInteractedComponents.Empty();
CurrentlyInteractedComponents.Reserve(CurrentlyInteractedComponents.Num() +
CurrentInteractableComponentsInRange.Num());
for (UInteractableComponent* InteractableComp : CurrentInteractableComponentsInRange)
......@@ -139,6 +140,7 @@ void UDirectInteractionComponent::OnEndInteraction(const FInputActionValue& Valu
Component->HandleOnActionEndEvents(this, InteractionInputAction, Value, EInteractorType::Direct);
}
}
CurrentlyInteractedComponents.Empty();
}
UInteractableComponent* UDirectInteractionComponent::SearchForInteractable(AActor* HitActor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment