Particle system in wrong place

I’ve set up the staticmeshcomponent and particlesystem in UProjectile, applied the correct particle system within the blueprint…
But… when I fire… no particles…
So… I made them bigger to see what was going on… maybe it was a scale problem… Still no particles…
Finally, I get them to about 100x100x100 and I start to see them…
IN THE CENTER OF THE MAP…

I paused and clicked on all the projectiles in the explorer, and they were all centered in an area towards the center of the map, but the actual meshes were being properly displayed taking off where I aimed them…

Unreal 4.15 apparantly doesn’t like

 LaunchBlast->Attach(RootComponent);

I was getting a compiler “warning” that the function was deprecated, and that the code needed to be changed before the next version of Unreal or it wouldn’t compile.
I replaced the code with:

LaunchBlast->AttachComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);

and it works now.

I used attach component aswell, but saw no particles spawning. After reading your post I saw them spawn in the center of the world. (but you have to scale them high see more then just the light it casts on your tank there)

I tried using SetupAttachment(RootComponent) instead, saw nothing even in center of the world.

Then after trying a few other things unreal crashed while compiling. After building in visual studio and opening up Unreal again, the particles were spawning on the barrel -_-. This is like the 5th or 6th time that my game crashing actually fixed a bug.

At first it looks as though there is a second bug of the particle not following the projectile in local space. But this is from the large scaling, it makes it look as though the particle effect does not move since the fire in it is so large as it moves away from you, so by the time the animation has ended it looks as though it happened right in front of you.

Faced the same issue here and using this works:

LaunchBlast->AttachComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);

But you actually have to close the editor, compile in VS and then launch the editor again.

YAY! ¬¬

Thanks guys, this helped me sort out this problem in a matter of minutes. Might have saved me a lot of time.

As of Unreal 4.22 this does not work anymore.

LaunchBlast->AttachComponent(...);

has become

LaunchBlast->AttachToComponent(
    RootComponent,
    FAttachmentTransformRules::KeepRelativeTransform);

But particles stick in the middle of the map. Any ideas?

Wow. This actually did the trick. The new signature is AttachToComponent - but the important part is closing Unreal Editor, compiling from Visual Studio, reopening Unreal Editor and it works.

What the goose is going on here? Well, at least it works now. Thank you.

Privacy & Terms