Attaching particle to actor

I’m using the 3rd person blueprint asset and i’m trying to set up a level blueprint so that by pressing a key , a particle effect spawns at player location < or socket > and attaches itself to player ,so basically move with player . here is the setup i came up with , but it doesnt quite work , it spawns the particle way behind the player . can anyone help please ?
my blueprint setup :

Do you want it to only attach when they press the key? Because if you went to the components tab, you could just add a particle system component right there, and it’ll follow on spawn and such.

I’m actually having issues attaching as well via blueprints. Sorry I couldn’t be more help

Hello shadow, Had a look at this? :

You just have to expose that and then activate it whenever you want through your Script and kill it whenever you want again through it.

This will probably help you:

Oh i’ve seen your tut for attaching to pawn like 5 days ago Fighter , actually seen them all . i dont know why i didnt think of that … man i’m going dumb thinking all day about how to utilize this AnimBluprint and i didnt make any progress at all … lol i’m going braindead .

Thank you for responding .

Wow i just finished testing both methods and thank you all , both works .

DieByZer0’s link requires that i put i mesh into my level before start playing . i couldnt figure out how to modify it to spawn from the player character , but it is a great way to make some cool cutscenes.

Fighter’s tutorial made my day . i did all i asked for . now by pressing R fire particle activates attached to player . and i set it up so after 4 seconds it deactivates and goes to 4 seconds cooldown .

Thank you again .

PS. i hate AnimBlueprint !

If you want to do this inside the character blueprint, make sure you’re getting a reference to the mesh as your Attach to Component. The easiest way to attach it to a socket is to put the socket’s name in as Attach Point Name and then set Location Type to “SnapToTarget”. Note that you can use either a socket name or a bone name for this.

You really shouldn’t be able to do things like ‘Get Root Component’ inside the Level BP, I think that was adding to your confusion! I added a task to make sure those functions are not visible in Level BP.

I’m new to this (Coding in UE4, never did it with UE3. Actually, I’m new to UE4 entirely) and I’m trying to attach particle effects to my floatingactor. Now, can I attach particle effects to my actor just through the content browser in the engine or do I need to attach it to my actor through the code, and if so, how?

You can do it entirely through blueprints, rob.gray just showed exactly how to do it.

Open up your actors blueprint, goto Add component—> Add particle emitter. Adjust transform to taste and turn off auto activate if necessary. From there you simply have to activate and deactivate component on certain events as needed.

Rob’s example spawns the emitter attached to a component of the actor. So really it comes down to what you need to do

@rob.gray : How do you make it follow the socket? I’m having an issue where the muzzle flash is spawned and attached to the muzzle socket, and when I move the effect doesn’t move with the socket. Could this be because I have enabled auto destroy and am spawning multiple emitters rapidly, or?

Hard to guess what’s happening without seeing how you have it set up. Can you post a screenshot of where you are spawning and attaching the effect? Is this a one-off type of effect like an explosion or something that persists?

Are you talking about the rotation of the muzzle flash?? Because inside the particle editor there is a tick box you need to tick so that the particle uses local rotation
Rather than world rotation

@rob.gray, In the Weapon Blueprint I’m spawning the MuzzleFlash with the “SpawnActor”, then I have a variable I’m connecting to the class (which is the weapon effect that spawns the emitter at location in it’s Blueprint class). After that I’m spawning the emitter again and connecting the Return Value from the “SpawnActor” to the Emitter Template (while getting the Particle variable). In the Spawn Emitter Attached Im attaching it to the Weapon and appropriate Socket.

I realize that I’m probably doing something wrong by spawning it twice…

But anyway, the result is the following:
(early prototype.)

Found the issue in the Effect Blueprint. Thanks for getting back to me.

This Worked Perfectly. Thank you

How did you fix this? Marking “Use local space” didn’t fix the problem for me.

@SalihBalkan, I’m not using local space, instead I use “Spawn Emitter Attached” and hooking it up through “Attach Point Name” (which I’ve called Muzzle) - all in the base weapon class.