How to stop a blueprint component after overlapping/hitting another blueprint

I have a blueprint with a niagara system and I am moving the niagara system using the ‘Move Component To’ node. I would like to stop it when it has overlapped/hit another blueprint/component. How can I do that?

My bp setup.

Hey @kennetherhabor!

You can use the On Component Begin Overlap node or the On Component Hit node. Though in order for them to work as expected, both components should be set to generate overlap events or hit events respectively. The overlap one is enabled by default but if you wanna go with the hit approach, you’ll need to enable it on both components (your component and the component(s) it’ll collide with)

Hope this helps :innocent:

1 Like

Hey @VisAgilis Thanks for the reply. Would this be done in the bp generating the movement or the one to be used in stoping the moving bp/component?

Hey there @kennetherhabor! As VA mentioned, connecting it directly to the stop (the overlap of the component) should work in your use case:

Though you may want to filter it.

1 Like

If you do it inside the one moving, you’d only connect it’s execution pin to the rest of the nodes you want to be executed when the collision occurs, such as stopping. If you choose to handle it in the other blueprint(s), you’d use the node’s hit actor / hit component pins to affect the hit object.

I’d recommend the first approach, just like the distinguished gentleman above :sparkling_heart:

1 Like

@SupportiveEntity @VisAgilis For some reason it didn’t work. My guess is that the ‘On Component Overlap’ needs the component/actor which is intended to be overlapped to be specified. I still can’t figure it out since it is a different blueprint.

I tried using a ‘Get actor of class’ or even ‘Get all actors of class’, but I still can’t figure out how to tie everything together or even if that is the right solution.

Nope. The node fires whenever your component named “NS_Fireball_Straight” overlaps something, regardless of what it overlaps with. Check this:

There’s also this:

It might be colliding with its owner! If it’s a pawn, for example, ignore it from the collision settings like this: