Hey,
So I have the high level goal of adding a boost mechanic to the toon tank game. When boosting the tank will move faster.
I have created and attached two UsceneComponets where I want to attach a emitter to spawn a vfx to only be active when boosting. However looking through the documentation I can’t find anything to turn off emitters only to spawn them? What would be the best way of actually controlling emitters. I noticed that some of the emitters can be set to die when their lifespan has expired. Would it be to constantly spawn in the vfx or is there a better way.
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Components", meta = (AllowPrivateAccess = "true"))
USceneComponent* BoostEmitterPointLeft;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Components", meta = (AllowPrivateAccess = "true"))
USceneComponent* BoostEmitterPointRight;
// In the cpp
BoostEmitterPointLeft = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("BoostEmitterPointLeft)"));
BoostEmitterPointLeft->SetupAttachment(BaseMesh);
BoostEmitterPointRight = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("BoostEmitterPointRight)"));
BoostEmitterPointRight->SetupAttachment(BaseMesh);
if(Boosting){
UGameplayStatics::SpawnEmitterAtLocation(this(Not sure if I should be using this or if I can use BoostEmitterPointRight , HitParticle,GetActorLocation());
}
I hope this makes sense what I am trying to accomplish thank you for any advice or feedback.