Initial Location on a ParticleSystemComponent.

Hi, i’m having some trouble finding a way to change the initial location module’s values of the emitter that is on my particle system. This is the code i use to create my particle system component, the template is of the created particle system in the editor.


UParticleSystemComponent* ParticleTemp = ConstructObject<UParticleSystemComponent>(UParticleSystemComponent::StaticClass(), RootComponent->GetOwner());
ParticleTemp->bAutoDestroy = false;
ParticleTemp->SecondsBeforeInactive = 0.0f;
ParticleTemp->bAutoActivate = false;
ParticleTemp->SetTemplate(TemplateSystems[0]);
ParticleTemp->bOverrideLODMethod = false;
ParticleTemp->RegisterComponentWithWorld(GetWorld());
 
ParticleTemp->SetActive(true);
ParticleTemp->AttachTo(RootComponent, NAME_None);
ParticleTemp->SetWorldLocationAndRotation(GetActorLocation(), GetActorRotation());

I have been looking through the headers but i cant seem to find where to change the values of the initial location module on the emitter that is in my particle system. Do anyone know how i can get access to the values i’m after?

I think what you’re looking for is to set the Initial Location module’s Start Location distribution to a DistributionVectorParticleParameter, specify a name for the distribution parameter, then use one of the following methods:


UParticleSystemComponent::SetVectorParameter(FName Name, FVector Param)

UParticleSystemComponent::SetVectorRandParameter(FName ParameterName,const FVector& Param,const FVector& ParamLow)