force off haptic commands when collision ends

This commit is contained in:
Mamadou Babaei
2023-05-19 18:15:36 +02:00
parent 3ef364ad86
commit f43ffd213c
@@ -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));
}
});
}