ForEachLoop doesn't iterate through all of the actors returned by the Get Overlapping Actors node.
Note: You can workaround this issue by adding the overlapped actors to an array and then looping through that array to destroy them (screenshot #04)
1. Open QA-Game
2. Create an actor class bp named 'bpBaseItemActor' & open it
3. In the Components tab, add a 'Cube' shape
4. Compile & save
5. Back in the editor, place several instances of the bp around the character, around 6-10 (screenshot #01)
6. Open the 'PlayerPawn' bp
7. In the Components tab, add a Box collision
8. With the Box selected, Details panel > change the Box Extent to 1000x1000x1000 (screenshot #02)
9. In the Event Graph, create the bp from screenshot #03
10. Compile
11. Back in the editor, Play-In-Editor
12. Press E to Get and Destroy all overlapping actors
Results: Only 2 or 3 of the bp's will be destoryed
Expected: For all overlapping actors to be destoryed
Note: You can workaround this issue by adding the overlapped actors to an array and then looping through that array to destroy them (screenshot #04)
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.5, 4.8 |
Created | Apr 10, 2015 |
---|---|
Resolved | Apr 11, 2015 |
Updated | Jul 14, 2021 |