Hi everyone. This question is regarding UDK–not UE4. (It seems like we have to say that now for the people who don’t see what forum they’re in.) I’m able to spawn a particle system component. I can see it just fine. But when the pawn moves, the particle system component stays put.
This is the code that spawns the particle system component:
var() ParticleSystem Particle;
var ParticleSystemComponent ParticleComponent;
var Pawn AttachedPawn;
function SpawnParticleSystem(Pawn P)
{
ParticleComponent = WorldInfo.MyEmitterPool.SpawnEmitter(Particle,P.Location,P.Rotation);
P.AttachComponent(ParticleComponent);
AttachedPawn = P;
}
“Particle,” the first var I declare is an archetype that I set beforehand. I’m using this class to keep track of status effects on the characters in my game and each status effect has its own particle system. Except for that, I think everything else here is pretty self-explanatory.
Any idea what I need to do to get the particle system component to follow the pawn I’m trying to attach it to?