do not cache grabbed actors as overlapped actors
This commit is contained in:
@@ -693,6 +693,11 @@ void ASGPawn::OnRealLeftHandOverlapBegins(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OtherActor == LeftHandGrabState.GrabbedActor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Pimpl->RegisterLeftHandOverlappedActor(OtherActor);
|
Pimpl->RegisterLeftHandOverlappedActor(OtherActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -733,6 +738,11 @@ void ASGPawn::OnRealRightHandOverlapBegins(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OtherActor == RightHandGrabState.GrabbedActor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Pimpl->RegisterRightHandOverlappedActor(OtherActor);
|
Pimpl->RegisterRightHandOverlappedActor(OtherActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1417,6 +1427,15 @@ void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor)
|
|||||||
Pimpl->DisableActorPhysics(Actor);
|
Pimpl->DisableActorPhysics(Actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Hand->IsRight())
|
||||||
|
{
|
||||||
|
Pimpl->UnregisterRightHandOverlappedActor(Actor);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Pimpl->UnregisterLeftHandOverlappedActor(Actor);
|
||||||
|
}
|
||||||
|
|
||||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||||
const bool bAttached = Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName);
|
const bool bAttached = Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName);
|
||||||
if (bAttached)
|
if (bAttached)
|
||||||
|
|||||||
Reference in New Issue
Block a user