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…
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:
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.
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.