fix a few bugs that does affect the real hand collision events because of SetVisibility and redundant checking against grabbed actor

This commit is contained in:
Mamadou Babaei
2024-08-16 18:01:51 +02:00
parent 55ba62deaa
commit f412c56654
2 changed files with 1 additions and 12 deletions
@@ -786,7 +786,7 @@ void USGVirtualHandComponent::FImpl::UpdateVisibility()
if (bSetNewVisibility)
{
SetVisibility(bHandDataAvailable);
Owner->SetHiddenInGame(bHandDataAvailable);
}
}
@@ -628,11 +628,6 @@ void ASGPawn::OnRealLeftHandOverlapBegins(
return;
}
if (OtherActor == LeftHandGrabState.GrabbedActor)
{
return;
}
Pimpl->RegisterLeftHandOverlappedActor(OtherActor);
}
@@ -673,11 +668,6 @@ void ASGPawn::OnRealRightHandOverlapBegins(
return;
}
if (OtherActor == RightHandGrabState.GrabbedActor)
{
return;
}
Pimpl->RegisterRightHandOverlappedActor(OtherActor);
}
@@ -1997,7 +1987,6 @@ void ASGPawn::FImpl::SetVisibility(USceneComponent* SceneComponent, const bool b
}
SceneComponent->SetHiddenInGame(!bVisibility);
SceneComponent->SetVisibility(bVisibility);
}
void ASGPawn::FImpl::UpdateHandLocation(const bool bRight, const FVector& Location, const bool bUpdateVirtualHand) const