I want to spawn a particle system attached to a projectile.
When “play as listen server” this seem to work:
void UNiagaraAttachedComponent::BeginPlay()
{
Super::BeginPlay();
const AActor *TheOwner = GetOwner();
if (!IsValid(TheOwner))
{
message::Error("TheOwner is NULL");
return;
}
if ( TheOwner->HasAuthority() ||
FRoleMode::IsAutonomousProxy(TheOwner) ||
FRoleMode::IsSimulatedProxy(TheOwner))
{
SpawnSystem();
}
}
When “play as client” it seems to works too… but i get a NULL instance of the particle system too. And i want to filter it.
The projectile is spawning on the server and replicated on clients.
What is the right way to do this?
Thank you so much!!