ComponentSweepMulti does not return the correct location of colliders if the component that is passed in has been rotated at all. The actual collision on the object in the game will be correct.
void ATestCompSweepMultiCharacter::RunSweep() { TArray<AActor*> TestCubeActorArray; UGameplayStatics::GetAllActorsOfClass(this->GetWorld(), ATestCubeActor::StaticClass(), TestCubeActorArray); GetWorld()->DebugDrawTraceTag = "DebugTraceTag"; FComponentQueryParams ComponentParams; ComponentParams.AddIgnoredActor(this); ComponentParams.TraceTag = FName("DebugTraceTag"); TArray<FHitResult> Hits; ATestCubeActor* TheActor = Cast<ATestCubeActor>(TestCubeActorArray[0]); TheActor->GetWorld()->ComponentSweepMulti(Hits, TheActor->TheMesh, this->GetActorLocation(), TheActor->TheMesh->GetComponentLocation(), TheActor->TheMesh->GetComponentRotation(), ComponentParams); }
RESULT:
The colliders drawn by the debug trace do not match the position of the colliders on the object.
EXPECTED:
The colliders drawn by the debug trace match the position of the colliders on the object.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 4.7.6, 4.9 |
Target Fix | 4.9 |
Fix Commit | 2605171 |
---|
Created | May 14, 2015 |
---|---|
Resolved | Jul 10, 2015 |
Updated | Apr 27, 2018 |