force off haptic commands when collision ends

This commit is contained in:
Mamadou Babaei
2023-05-12 14:25:01 +02:00
parent ea01bcb425
commit 0c2eebd9ac
@@ -272,6 +272,10 @@ void ASGPlayerController::BeginPlay()
GetWorldTimerManager().SetTimer(
Pimpl->TouchBuzzStopTimer, TouchBuzzStopHandler, Duration, false, -1.0f);
}
else
{
Glove->SendHaptics(USGBuzzCommand::Off(this));
}
const USGForceFeedbackCommand* ForceFeedbackCommand{Pimpl->GetForceFeedbackCommand(
ActorThumbTouching, ActorIndexTouching, ActorMiddleTouching, ActorRingTouching, ActorPinkyTouching)};
@@ -279,6 +283,10 @@ void ASGPlayerController::BeginPlay()
{
Glove->SendHaptics(ForceFeedbackCommand);
}
else
{
Glove->SendHaptics(USGForceFeedbackCommand::Off(this));
}
});
}