force off haptic commands when collision ends

This commit is contained in:
Mamadou Babaei
2023-05-19 18:12:05 +02:00
parent 3185d7a6f2
commit 1159fc845a
@@ -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));
}
});
}