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:02:19 +02:00
parent 9a76aa7d01
commit 41b4de7d55
2 changed files with 1 additions and 12 deletions
@@ -786,7 +786,7 @@ void USGVirtualHandComponent::FImpl::UpdateVisibility()
if (bSetNewVisibility) if (bSetNewVisibility)
{ {
SetVisibility(bHandDataAvailable); Owner->SetHiddenInGame(bHandDataAvailable);
} }
} }
@@ -628,11 +628,6 @@ void ASGPawn::OnRealLeftHandOverlapBegins(
return; return;
} }
if (OtherActor == LeftHandGrabState.GrabbedActor)
{
return;
}
Pimpl->RegisterLeftHandOverlappedActor(OtherActor); Pimpl->RegisterLeftHandOverlappedActor(OtherActor);
} }
@@ -673,11 +668,6 @@ void ASGPawn::OnRealRightHandOverlapBegins(
return; return;
} }
if (OtherActor == RightHandGrabState.GrabbedActor)
{
return;
}
Pimpl->RegisterRightHandOverlappedActor(OtherActor); Pimpl->RegisterRightHandOverlappedActor(OtherActor);
} }
@@ -1997,7 +1987,6 @@ void ASGPawn::FImpl::SetVisibility(USceneComponent* SceneComponent, const bool b
} }
SceneComponent->SetHiddenInGame(!bVisibility); SceneComponent->SetHiddenInGame(!bVisibility);
SceneComponent->SetVisibility(bVisibility);
} }
void ASGPawn::FImpl::UpdateHandLocation(const bool bRight, const FVector& Location, const bool bUpdateVirtualHand) const void ASGPawn::FImpl::UpdateHandLocation(const bool bRight, const FVector& Location, const bool bUpdateVirtualHand) const