Skip to content
Snippets Groups Projects
Commit 1298dfef authored by David Gilbert's avatar David Gilbert :bug: Committed by Timon Römer
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent 9b15677d
No related branches found
No related tags found
2 merge requests!81Inten Select 5.3,!80UE5.3-2023.1-rc2
Pipeline #371788 failed
......@@ -112,7 +112,8 @@ void UDirectInteractionComponent::OnBeginInteraction(const FInputActionValue& Va
if (bOnlyInteractWithClosestActor)
{
auto MinElement = *Algo::MinElementBy(
CurrentInteractableComponentsInRange, [&](auto Element)
CurrentInteractableComponentsInRange,
[&](auto Element)
{ return FVector(Element->GetOwner()->GetActorLocation() - InteractionLocation).Size(); });
MinElement->HandleOnActionStartEvents(this, InteractionInputAction, Value, EInteractorType::Direct);
CurrentlyInteractedComponents = {MinElement};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment