I’ve been struggling for days with Pinch Grab not working in multiplayer using the Meta Interaction SDK (UE5).
Palm Grab worked fine, but Pinch never fired on clients — even though single-player worked perfectly.
After digging through the SDK source code, I finally found the root cause and a clean workaround.
I’m sharing it here in case anyone else is fighting the same issue.
I found it's not related to GameMode's RestartPlayer function, it's just Meta InteractionSDK bug need to patch when multiplay
First, I added InteractionSDK project codes into my plugins folder, so I can make break point and debug..
In UIsdkHandRigComponent::BeginPlay(), the Interaction SDK tries to bind input actions: (it call parent UIsdkRigComponent::BeginPlay() function call, super::BeginPlay()),
Inside UIsdkRigComponent::BeginPlay(), there is below codes,
if (bAutoBindInputActions)
{
AActor* OwnerActor = GetOwner();
OwnerActor->EnableInput(LocalPlayer);
auto EnhancedInputComponent = OwnerActor->FindComponentByClass<UEnhancedInputComponent>();
if (EnhancedInputComponent)
{
BindInputActions(EnhancedInputComponent);
}
......
}
Single Play or Multiplay as ListenServer Play, it's okay, because the Pawn’s InputComponent has already been created before BeginPlay.
But, Multiplay as Client, FindComponentByClass<UEnhancedInputComponent>() returns nullptr, So Pinch input actions never get bound on the client
Maybe there are two to fix the problem, one is delay bind or check bind until find UEnhancedInputComponent
I tested two ways, all make work in multiplay client pinch action
As second way, I made a function like below
void UIsdkHandRigComponent::BindPinchInputActions()
{
APawn* OwnerPawn = Cast<APawn>(GetOwner());
if (!OwnerPawn || !OwnerPawn->IsLocallyControlled())
return;
const auto FirstLocalPlayer = UGameplayStatics::GetPlayerController(this, 0);
AActor* OwnerActor = GetOwner();
OwnerActor->EnableInput(FirstLocalPlayer);
const auto EnhancedInputComponent = OwnerActor->FindComponentByClass<UEnhancedInputComponent>();
if (EnhancedInputComponent)
{
BindInputActions(EnhancedInputComponent);
}
}
and I checked in TickCompoent function
void UIsdkHandRigComponent::TickComponent(
float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
if (IsPinchGrabBinded == false)
{
BindPinchInputActions();
}
(I added IsPinchGrabBinded = true; into BindPinchInputActions() function if bind successed)
Pinch Grab failed in MP because Interaction SDK attempts to bind input in BeginPlay before the client creates its EnhancedInputComponent.
Delaying or retrying the binding fixes it fully.
Hopefully, this saves someone hours of debugging the Interaction SDK internals