# GetWorld()-\>ComponentSweepMulti() incorrect working

**URL:** <https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645>\
**Category:** World Creation\
**Tags:** sweep, Trace, unreal-engine, question, CPP\
**Created:** [May 6, 2015, 2:38pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645 "2015-05-06T14:38:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BingoBongo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BingoBongo](https://forums.unrealengine.com/u/BingoBongo)\
**Post date:** [May 6, 2015, 2:38pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/1 "2015-05-06T14:38:39Z")

</div>

“OutHits” have incorrect “Location” and “ImpactPoint” if “Rot”=“PrimComp-\>GetComponentRotation()” not ZeroVector. My “PrimComp” have several shapes for collision.

static mesh geometry

 ![41603-popa2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/2/5121151d8dab2f4ec551d8ad4211f989d13f56a6.png)

static mesh geometry in ComponentSweepMulti (GetWorld()-\>DebugDrawTraceTag=“DebugTraceTag”)

 ![41604-popa3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/8/ec80fe176065daa211bcb26f539cfd0ce2af5625.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [May 12, 2015, 10:26pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/2 "2015-05-12T22:26:17Z")

</div>

Hi BingoBongo,

I am going to be looking into this issue, but I had a question before getting started.

- Is the mesh in the first image you provided a single static mesh object with multiple collision boxes, or is that a Blueprint containing several StaticMeshComponents, each with its own collider?

Any additional information you may have would be helpful.

---

<div class="post-metadata">

**Author:** ![BingoBongo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BingoBongo](https://forums.unrealengine.com/u/BingoBongo)\
**Post date:** [May 13, 2015, 12:45pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/3 "2015-05-13T12:45:03Z")

</div>

Hi!

> “single static mesh object with multiple collision boxes”  
> It is right.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [May 14, 2015, 4:35pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/4 "2015-05-14T16:35:03Z")

</div>

I ran some tests today (using 4.7.6 built from source code) and did see some unexpected behavior. Have you rotated the component in question at all, either in the level or in the Blueprint editor? If so, if you temporarily set all of the component’s rotation to 0, do the results from the ComponentSweepMulti correctly line up with the mesh? The results I saw showed the original location of the collision boxes from before the component was rotated.

What version of the Engine are you using currently?

---

<div class="post-metadata">

**Author:** ![BingoBongo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BingoBongo](https://forums.unrealengine.com/u/BingoBongo)\
**Post date:** [May 14, 2015, 7:20pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/5 "2015-05-14T19:20:00Z")

</div>

I’m rotate actor (not Component directly (!) ). Actor have StaticMeshComponent. StaticmMeshComponent is a RootComponent. I’m extract world rotation from StaticMeshComponent for function ComponentSweepMulti(). I’m rotate actor in Editor and watch bug in game. If rotation set to 0 then ComponentSweepMulti() correctly working.

My UE version is 4.7.6 / My English bad 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [May 14, 2015, 8:08pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/6 "2015-05-14T20:08:07Z")

</div>

Thank you for the additional information. I have one last question for you: Even though the debug trace information shows the collision boxes in the wrong place, is the actual collision in the game working correctly?

---

<div class="post-metadata">

**Author:** ![BingoBongo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BingoBongo](https://forums.unrealengine.com/u/BingoBongo)\
**Post date:** [May 14, 2015, 8:32pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/7 "2015-05-14T20:32:44Z")

</div>

no! this whole problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [May 14, 2015, 9:47pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/8 "2015-05-14T21:47:44Z")

</div>

When I ran my tests, the results of the debug trace showed collision boxes that were not in the correct place, but the actual collision on my static mesh object in the game was correct. I will continue testing this to see if I can get the object’s collision to also work incorrectly.

---

<div class="post-metadata">

**Author:** ![BingoBongo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BingoBongo](https://forums.unrealengine.com/u/BingoBongo)\
**Post date:** [May 14, 2015, 10:03pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/9 "2015-05-14T22:03:20Z")

</div>

Sorry. I reported false information. Collision worked perfectly. ComponentSweepMulti() worked incorrectly and return incorrectly results.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [May 14, 2015, 10:31pm UTC](https://forums.unrealengine.com/t/getworld-componentsweepmulti-incorrect-working/317645/10 "2015-05-14T22:31:19Z")

</div>

Hi BingoBongo,

Thank you for all of the additional information you have provided related to this issue. I have submitted a report of my observations to have this investigated further (UE-15638).
