stop all haptics on end play in order to make sure the glove won't get stuck in haptics feedbacks

This commit is contained in:
Mamadou Babaei
2023-05-19 18:14:54 +02:00
parent 5f350b4b43
commit 637150ea10
@@ -624,6 +624,11 @@ bool USGVirtualHandComponent::FImpl::InitializeBackend() const
bool USGVirtualHandComponent::FImpl::UninitializeBackend() const bool USGVirtualHandComponent::FImpl::UninitializeBackend() const
{ {
if (IsValid(Owner->Glove))
{
Owner->Glove->StopHaptics();
}
// NOTE // NOTE
// In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand // In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand
// to disappear in the editor as the plugin won't be able to retrieve the glove status anymore. // to disappear in the editor as the plugin won't be able to retrieve the glove status anymore.