ParticleSystem SetHiddenInGame Not Hiding

Hi,

I’ve set up a ribbon trail attached to an actor. I then move the actor around to create the particletrail. I would like to wait to show the trail until I am finished moving the actor around, then show its trail, then have it removed. My problem is that the SetHiddenInGame() dosent seem to be hiding the trail.

Actor constructor:

ConstructorHelpers::FObjectFinder<UParticleSystem> ArbitraryParticleName(TEXT("ParticleSystem'/Game/Space/Effects/ParticleSystems/P_Ribbon_trails.P_Ribbon_trails'"));
	OrbitParticleSystem = PCIP.CreateDefaultSubobject<UParticleSystemComponent>(this, TEXT("ArbitraryParticleName"));

	if (ArbitraryParticleName.Succeeded()) {
		OrbitParticleSystem->Template = ArbitraryParticleName.Object;
	}

	
	
	UGameplayStatics::SpawnEmitterAttached(
		OrbitParticleSystem->Template, //UParticleSystem*  
		RootComponent,
		NAME_None,
		FVector(0, 0, 0),
		FRotator(0, 0, 0),
		EAttachLocation::KeepRelativeOffset,
		false
		);
	
	OrbitParticleSystem->SetHiddenInGame(true, true);

…but when the actor is spawned, it immediately draws the trail. Any ideas?

Well, UGameplayStatics::SpawnEmitterAttached creates completely new particle system component so you have doubled components :wink:

And when You calls OrbitParticleSystem->SetHiddenInGame the engine isn’t hiding PSC spawned by UGameplayStatics::SpawnEmitterAttached, remember reference to this PSC or get rid of it.

Then in your OrbitParticleSystem in BP set Auto Activate to false, and try use Activate/Deactivate functions on OrbitParticleSystem .

Regards

Pierdek

Ugh…how did I miss that. Thanks.