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.
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How to delete some elements correctly when deleting an array loop?
What controls of umg have mouse wheel events in UE4.27?
How does TArray loop correctly remove elements in blueprints?
What is the difference between Camera and CineCamera?
How to implement springarm components to scale according to mouse position in spawn?
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 |