How can I spawn and attach a particle to a character when they touch something?

I want to dynamically spawn and attach a particle to the character that i created in a Bp when the main character touches something,how to achieve this in bp?

Try this:

  • Use ‘Spawn Actor’ node to spawn the particle system.
  • Use ‘Attach Actor to Actor’ after ‘Spawn Actor’ to attach it to your player.

but in the spawnactor ,which class should i select to spawn a particle?could you tell me more on it ?thx a lot!

i tried it but i don’t know how to make the reference to the player and the particle

It looks like you are using My Character Blueprint, You can get a reference for “self” and plug it in there.

Right Click and type ‘Self’

sorry,i cannot see the picture clearly,maybe because of the bad Internet connection,could you upload the picture as an attachment?



just as you said,i tried but i cannot link the return value of the “spawn emitter at location” to the target of the attach “actor to actor”

The is weird. Are you sure you are trying to connect the right pins?
Try to conenct it the other way, ie drag from ‘Target’ to ‘Return Value’.

I can’t seem to connect the ‘return Value’ to ‘Target’ either. It says they’re not compatible.

Also what if you want to attach the particle to all other actors in the world. What would you plug into 'Parent Actor"?

Am I ok to add to the original question like this? Not sure of the rules sorry.

Try Attached to Component

Spawn Emitter Attached is what you want. Set it to snap to target in the drop down, and give it a bone/socket name.