# Unable to use Add Radial Impulse on an Array multiple times 

**URL:** <https://forums.unrealengine.com/t/unable-to-use-add-radial-impulse-on-an-array-multiple-times/1196605>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [June 12, 2023, 8:57am UTC](https://forums.unrealengine.com/t/unable-to-use-add-radial-impulse-on-an-array-multiple-times/1196605 "2023-06-12T08:57:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![R.Chardakov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@R.Chardakov](https://forums.unrealengine.com/u/R.Chardakov)\
**Post date:** [June 12, 2023, 8:57am UTC](https://forums.unrealengine.com/t/unable-to-use-add-radial-impulse-on-an-array-multiple-times/1196605/1 "2023-06-12T08:57:43Z")

</div>

For a quick Rundown I am doing a personal project for VFX but I am also doing the BP part of it. I had done BP before a little bit and have experience in C# so I felt comfortable with. Anyway my problem is this

I do a sphere cast get all the objects in that spherecast then I do a foreach loop to find the primitive components in the objects hit by the Spherecast I then put those objects in an array variable.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/d/2adb8a2c33c770c538538a315d7440dfadf6cff9.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/f/fbf8be44ff842a8d4a64fa6ab19c9bad172c5a96.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/0/220305b9f6bed05ef13c5404cc8af1c56870fd5b.png)  
If I do this once it works great and does add the impulse to all the objects in the array however if I add a timeline so I can control and repeat the Radial Impulse it only works for one object and not longer works for the whole array. I also tried putting the timeline plus Add Radial Impulse in another for loop with the array I had made but same result.

Is there a better way to approach trying to get simulated objects to be attracted to point in space for a duration of time and do it on all of them at the same time?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 12, 2023, 9:34am UTC](https://forums.unrealengine.com/t/unable-to-use-add-radial-impulse-on-an-array-multiple-times/1196605/2 "2023-06-12T09:34:49Z")

</div>

It probably does not work because you keep overriding the array:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/b/52be3a95cdaad4ffa99bb3859da16af1f7e171da.png)

Instead of adding to it.

* * *

Perhaps it would be easier to get the components directly, and use a dedicated channel so no filtering is even necessary:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/6/126ec939c7b07aee505adada066cacf748a60cb1.png)

This way you do not even need to loop. Especially useful if a single actor contains _many_ simulating meshes.

* * *

> Is there a better way to approach trying to get simulated objects to be attracted to point in space for a duration of time and do it on all of them at the same time?

I’ve done many similar mechanics over the years, see if this one makes sense:

> [@UE5 is there a simple way to override gravity in a volume](https://forums.unrealengine.com/t/ue5-is-there-a-simple-way-to-override-gravity-in-a-volume/790265/2):
>
> See if you can work with something along the lines of: an actor with a collision volume detecting components that overlap it if the entering comp has an appropriate tag and simulates physics, we add it to an array when comps leave volume, we remove them from the array the actor applies force to all components that meet the abovementioned criteria The spheres are unaffected here as they do not have the tag - that’d be one way to exclude things. In a Cube, the gravity would chang…
